compact-agent 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +394 -0
- package/bin/anycode.js +2 -0
- package/bin/crowcoder.js +19 -0
- package/bin/ecc-hooks.cjs +138 -0
- package/dist/agents.d.ts +17 -0
- package/dist/agents.js +1603 -0
- package/dist/agents.js.map +1 -0
- package/dist/api.d.ts +16 -0
- package/dist/api.js +115 -0
- package/dist/api.js.map +1 -0
- package/dist/autonomous-loops.d.ts +108 -0
- package/dist/autonomous-loops.js +526 -0
- package/dist/autonomous-loops.js.map +1 -0
- package/dist/codemaps.d.ts +53 -0
- package/dist/codemaps.js +325 -0
- package/dist/codemaps.js.map +1 -0
- package/dist/compaction.d.ts +30 -0
- package/dist/compaction.js +125 -0
- package/dist/compaction.js.map +1 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +79 -0
- package/dist/config.js.map +1 -0
- package/dist/content-engine.d.ts +97 -0
- package/dist/content-engine.js +721 -0
- package/dist/content-engine.js.map +1 -0
- package/dist/cost-tracker.d.ts +49 -0
- package/dist/cost-tracker.js +150 -0
- package/dist/cost-tracker.js.map +1 -0
- package/dist/counter-button.d.ts +35 -0
- package/dist/counter-button.js +48 -0
- package/dist/counter-button.js.map +1 -0
- package/dist/counter.d.ts +21 -0
- package/dist/counter.js +31 -0
- package/dist/counter.js.map +1 -0
- package/dist/coverage.d.ts +23 -0
- package/dist/coverage.js +215 -0
- package/dist/coverage.js.map +1 -0
- package/dist/docs-sync.d.ts +23 -0
- package/dist/docs-sync.js +266 -0
- package/dist/docs-sync.js.map +1 -0
- package/dist/ecc.d.ts +41 -0
- package/dist/ecc.js +644 -0
- package/dist/ecc.js.map +1 -0
- package/dist/evaluation.d.ts +24 -0
- package/dist/evaluation.js +412 -0
- package/dist/evaluation.js.map +1 -0
- package/dist/export.d.ts +22 -0
- package/dist/export.js +109 -0
- package/dist/export.js.map +1 -0
- package/dist/git-workflow.d.ts +22 -0
- package/dist/git-workflow.js +197 -0
- package/dist/git-workflow.js.map +1 -0
- package/dist/hook-controls.d.ts +34 -0
- package/dist/hook-controls.js +90 -0
- package/dist/hook-controls.js.map +1 -0
- package/dist/hooks.d.ts +30 -0
- package/dist/hooks.js +130 -0
- package/dist/hooks.js.map +1 -0
- package/dist/html-parser.d.ts +18 -0
- package/dist/html-parser.js +101 -0
- package/dist/html-parser.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1230 -0
- package/dist/index.js.map +1 -0
- package/dist/learning.d.ts +35 -0
- package/dist/learning.js +238 -0
- package/dist/learning.js.map +1 -0
- package/dist/login.d.ts +37 -0
- package/dist/login.js +191 -0
- package/dist/login.js.map +1 -0
- package/dist/memory.d.ts +39 -0
- package/dist/memory.js +183 -0
- package/dist/memory.js.map +1 -0
- package/dist/model-router.d.ts +23 -0
- package/dist/model-router.js +145 -0
- package/dist/model-router.js.map +1 -0
- package/dist/modes.d.ts +17 -0
- package/dist/modes.js +217 -0
- package/dist/modes.js.map +1 -0
- package/dist/orchestration.d.ts +37 -0
- package/dist/orchestration.js +139 -0
- package/dist/orchestration.js.map +1 -0
- package/dist/package-detect.d.ts +36 -0
- package/dist/package-detect.js +529 -0
- package/dist/package-detect.js.map +1 -0
- package/dist/permissions.d.ts +25 -0
- package/dist/permissions.js +50 -0
- package/dist/permissions.js.map +1 -0
- package/dist/pm2-manager.d.ts +40 -0
- package/dist/pm2-manager.js +127 -0
- package/dist/pm2-manager.js.map +1 -0
- package/dist/query.d.ts +15 -0
- package/dist/query.js +278 -0
- package/dist/query.js.map +1 -0
- package/dist/refactor.d.ts +22 -0
- package/dist/refactor.js +226 -0
- package/dist/refactor.js.map +1 -0
- package/dist/retry.d.ts +20 -0
- package/dist/retry.js +88 -0
- package/dist/retry.js.map +1 -0
- package/dist/rules.d.ts +34 -0
- package/dist/rules.js +942 -0
- package/dist/rules.js.map +1 -0
- package/dist/schema.d.ts +23 -0
- package/dist/schema.js +12 -0
- package/dist/schema.js.map +1 -0
- package/dist/search-first.d.ts +17 -0
- package/dist/search-first.js +301 -0
- package/dist/search-first.js.map +1 -0
- package/dist/security.d.ts +10 -0
- package/dist/security.js +145 -0
- package/dist/security.js.map +1 -0
- package/dist/sessions.d.ts +21 -0
- package/dist/sessions.js +112 -0
- package/dist/sessions.js.map +1 -0
- package/dist/skill-create.d.ts +38 -0
- package/dist/skill-create.js +389 -0
- package/dist/skill-create.js.map +1 -0
- package/dist/skills.d.ts +34 -0
- package/dist/skills.js +161 -0
- package/dist/skills.js.map +1 -0
- package/dist/strategic-compaction.d.ts +24 -0
- package/dist/strategic-compaction.js +144 -0
- package/dist/strategic-compaction.js.map +1 -0
- package/dist/system-prompt.d.ts +3 -0
- package/dist/system-prompt.js +101 -0
- package/dist/system-prompt.js.map +1 -0
- package/dist/theme.d.ts +60 -0
- package/dist/theme.js +220 -0
- package/dist/theme.js.map +1 -0
- package/dist/tools/bash.d.ts +2 -0
- package/dist/tools/bash.js +49 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/edit.d.ts +2 -0
- package/dist/tools/edit.js +76 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/glob.d.ts +2 -0
- package/dist/tools/glob.js +54 -0
- package/dist/tools/glob.js.map +1 -0
- package/dist/tools/grep.d.ts +2 -0
- package/dist/tools/grep.js +64 -0
- package/dist/tools/grep.js.map +1 -0
- package/dist/tools/index.d.ts +5 -0
- package/dist/tools/index.js +27 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/list-dir.d.ts +2 -0
- package/dist/tools/list-dir.js +51 -0
- package/dist/tools/list-dir.js.map +1 -0
- package/dist/tools/read.d.ts +2 -0
- package/dist/tools/read.js +56 -0
- package/dist/tools/read.js.map +1 -0
- package/dist/tools/types.d.ts +45 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/web-fetch.d.ts +2 -0
- package/dist/tools/web-fetch.js +41 -0
- package/dist/tools/web-fetch.js.map +1 -0
- package/dist/tools/web-search.d.ts +27 -0
- package/dist/tools/web-search.js +139 -0
- package/dist/tools/web-search.js.map +1 -0
- package/dist/tools/write.d.ts +2 -0
- package/dist/tools/write.js +36 -0
- package/dist/tools/write.js.map +1 -0
- package/dist/types.d.ts +28 -0
- package/dist/types.js +57 -0
- package/dist/types.js.map +1 -0
- package/dist/users.d.ts +51 -0
- package/dist/users.js +193 -0
- package/dist/users.js.map +1 -0
- package/dist/verification.d.ts +73 -0
- package/dist/verification.js +269 -0
- package/dist/verification.js.map +1 -0
- package/dist/walkthrough.d.ts +10 -0
- package/dist/walkthrough.js +121 -0
- package/dist/walkthrough.js.map +1 -0
- package/package.json +58 -0
- package/resources/ecc/agents/architect.json +16 -0
- package/resources/ecc/agents/architect.md +212 -0
- package/resources/ecc/agents/build-error-resolver.json +17 -0
- package/resources/ecc/agents/build-error-resolver.md +116 -0
- package/resources/ecc/agents/chief-of-staff.json +17 -0
- package/resources/ecc/agents/chief-of-staff.md +153 -0
- package/resources/ecc/agents/code-reviewer.json +16 -0
- package/resources/ecc/agents/code-reviewer.md +238 -0
- package/resources/ecc/agents/database-reviewer.json +16 -0
- package/resources/ecc/agents/database-reviewer.md +92 -0
- package/resources/ecc/agents/doc-updater.json +16 -0
- package/resources/ecc/agents/doc-updater.md +108 -0
- package/resources/ecc/agents/e2e-runner.json +17 -0
- package/resources/ecc/agents/e2e-runner.md +109 -0
- package/resources/ecc/agents/go-build-resolver.json +17 -0
- package/resources/ecc/agents/go-build-resolver.md +96 -0
- package/resources/ecc/agents/go-reviewer.json +16 -0
- package/resources/ecc/agents/go-reviewer.md +77 -0
- package/resources/ecc/agents/harness-optimizer.json +15 -0
- package/resources/ecc/agents/harness-optimizer.md +34 -0
- package/resources/ecc/agents/loop-operator.json +16 -0
- package/resources/ecc/agents/loop-operator.md +36 -0
- package/resources/ecc/agents/planner.json +15 -0
- package/resources/ecc/agents/planner.md +212 -0
- package/resources/ecc/agents/python-reviewer.json +16 -0
- package/resources/ecc/agents/python-reviewer.md +99 -0
- package/resources/ecc/agents/refactor-cleaner.json +17 -0
- package/resources/ecc/agents/refactor-cleaner.md +87 -0
- package/resources/ecc/agents/security-reviewer.json +16 -0
- package/resources/ecc/agents/security-reviewer.md +109 -0
- package/resources/ecc/agents/tdd-guide.json +17 -0
- package/resources/ecc/agents/tdd-guide.md +93 -0
- package/resources/ecc/commands/add-language-rules.md +39 -0
- package/resources/ecc/commands/database-migration.md +36 -0
- package/resources/ecc/commands/feature-development.md +38 -0
- package/resources/ecc/prompts/build-fix.prompt.md +47 -0
- package/resources/ecc/prompts/code-review.prompt.md +56 -0
- package/resources/ecc/prompts/plan.prompt.md +52 -0
- package/resources/ecc/prompts/refactor.prompt.md +50 -0
- package/resources/ecc/prompts/security-review.prompt.md +70 -0
- package/resources/ecc/prompts/tdd.prompt.md +47 -0
- package/resources/ecc/rules/common-agents.md +53 -0
- package/resources/ecc/rules/common-coding-style.md +52 -0
- package/resources/ecc/rules/common-development-workflow.md +33 -0
- package/resources/ecc/rules/common-git-workflow.md +28 -0
- package/resources/ecc/rules/common-hooks.md +34 -0
- package/resources/ecc/rules/common-patterns.md +35 -0
- package/resources/ecc/rules/common-performance.md +59 -0
- package/resources/ecc/rules/common-security.md +33 -0
- package/resources/ecc/rules/common-testing.md +33 -0
- package/resources/ecc/rules/golang-coding-style.md +31 -0
- package/resources/ecc/rules/golang-hooks.md +16 -0
- package/resources/ecc/rules/golang-patterns.md +44 -0
- package/resources/ecc/rules/golang-security.md +33 -0
- package/resources/ecc/rules/golang-testing.md +30 -0
- package/resources/ecc/rules/kotlin-coding-style.md +39 -0
- package/resources/ecc/rules/kotlin-hooks.md +16 -0
- package/resources/ecc/rules/kotlin-patterns.md +50 -0
- package/resources/ecc/rules/kotlin-security.md +58 -0
- package/resources/ecc/rules/kotlin-testing.md +38 -0
- package/resources/ecc/rules/php-coding-style.md +25 -0
- package/resources/ecc/rules/php-hooks.md +21 -0
- package/resources/ecc/rules/php-patterns.md +23 -0
- package/resources/ecc/rules/php-security.md +24 -0
- package/resources/ecc/rules/php-testing.md +26 -0
- package/resources/ecc/rules/python-coding-style.md +42 -0
- package/resources/ecc/rules/python-hooks.md +19 -0
- package/resources/ecc/rules/python-patterns.md +39 -0
- package/resources/ecc/rules/python-security.md +30 -0
- package/resources/ecc/rules/python-testing.md +38 -0
- package/resources/ecc/rules/swift-coding-style.md +47 -0
- package/resources/ecc/rules/swift-hooks.md +20 -0
- package/resources/ecc/rules/swift-patterns.md +66 -0
- package/resources/ecc/rules/swift-security.md +33 -0
- package/resources/ecc/rules/swift-testing.md +45 -0
- package/resources/ecc/rules/typescript-coding-style.md +63 -0
- package/resources/ecc/rules/typescript-hooks.md +20 -0
- package/resources/ecc/rules/typescript-patterns.md +50 -0
- package/resources/ecc/rules/typescript-security.md +26 -0
- package/resources/ecc/rules/typescript-testing.md +16 -0
- package/resources/ecc/skills/agent-introspection-debugging/SKILL.md +152 -0
- package/resources/ecc/skills/agent-introspection-debugging/agents/openai.yaml +7 -0
- package/resources/ecc/skills/agent-sort/SKILL.md +214 -0
- package/resources/ecc/skills/agent-sort/agents/openai.yaml +7 -0
- package/resources/ecc/skills/api-design/SKILL.md +522 -0
- package/resources/ecc/skills/api-design/agents/openai.yaml +7 -0
- package/resources/ecc/skills/article-writing/SKILL.md +78 -0
- package/resources/ecc/skills/article-writing/agents/openai.yaml +7 -0
- package/resources/ecc/skills/backend-patterns/SKILL.md +597 -0
- package/resources/ecc/skills/backend-patterns/agents/openai.yaml +7 -0
- package/resources/ecc/skills/brand-voice/SKILL.md +96 -0
- package/resources/ecc/skills/brand-voice/agents/openai.yaml +7 -0
- package/resources/ecc/skills/brand-voice/references/voice-profile-schema.md +55 -0
- package/resources/ecc/skills/bun-runtime/SKILL.md +83 -0
- package/resources/ecc/skills/bun-runtime/agents/openai.yaml +7 -0
- package/resources/ecc/skills/coding-standards/SKILL.md +548 -0
- package/resources/ecc/skills/coding-standards/agents/openai.yaml +7 -0
- package/resources/ecc/skills/content-engine/SKILL.md +130 -0
- package/resources/ecc/skills/content-engine/agents/openai.yaml +7 -0
- package/resources/ecc/skills/crosspost/SKILL.md +110 -0
- package/resources/ecc/skills/crosspost/agents/openai.yaml +7 -0
- package/resources/ecc/skills/deep-research/SKILL.md +154 -0
- package/resources/ecc/skills/deep-research/agents/openai.yaml +7 -0
- package/resources/ecc/skills/dmux-workflows/SKILL.md +143 -0
- package/resources/ecc/skills/dmux-workflows/agents/openai.yaml +7 -0
- package/resources/ecc/skills/documentation-lookup/SKILL.md +89 -0
- package/resources/ecc/skills/documentation-lookup/agents/openai.yaml +7 -0
- package/resources/ecc/skills/e2e-testing/SKILL.md +325 -0
- package/resources/ecc/skills/e2e-testing/agents/openai.yaml +7 -0
- package/resources/ecc/skills/eval-harness/SKILL.md +235 -0
- package/resources/ecc/skills/eval-harness/agents/openai.yaml +7 -0
- package/resources/ecc/skills/everything-claude-code/SKILL.md +442 -0
- package/resources/ecc/skills/everything-claude-code/agents/openai.yaml +7 -0
- package/resources/ecc/skills/exa-search/SKILL.md +169 -0
- package/resources/ecc/skills/exa-search/agents/openai.yaml +7 -0
- package/resources/ecc/skills/fal-ai-media/SKILL.md +276 -0
- package/resources/ecc/skills/fal-ai-media/agents/openai.yaml +7 -0
- package/resources/ecc/skills/frontend-patterns/SKILL.md +647 -0
- package/resources/ecc/skills/frontend-patterns/agents/openai.yaml +7 -0
- package/resources/ecc/skills/frontend-slides/SKILL.md +183 -0
- package/resources/ecc/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/resources/ecc/skills/frontend-slides/agents/openai.yaml +7 -0
- package/resources/ecc/skills/investor-materials/SKILL.md +95 -0
- package/resources/ecc/skills/investor-materials/agents/openai.yaml +7 -0
- package/resources/ecc/skills/investor-outreach/SKILL.md +90 -0
- package/resources/ecc/skills/investor-outreach/agents/openai.yaml +7 -0
- package/resources/ecc/skills/market-research/SKILL.md +74 -0
- package/resources/ecc/skills/market-research/agents/openai.yaml +7 -0
- package/resources/ecc/skills/mcp-server-patterns/SKILL.md +66 -0
- package/resources/ecc/skills/mcp-server-patterns/agents/openai.yaml +7 -0
- package/resources/ecc/skills/mle-workflow/SKILL.md +346 -0
- package/resources/ecc/skills/mle-workflow/agents/openai.yaml +7 -0
- package/resources/ecc/skills/nextjs-turbopack/SKILL.md +43 -0
- package/resources/ecc/skills/nextjs-turbopack/agents/openai.yaml +7 -0
- package/resources/ecc/skills/product-capability/SKILL.md +140 -0
- package/resources/ecc/skills/product-capability/agents/openai.yaml +7 -0
- package/resources/ecc/skills/security-review/SKILL.md +494 -0
- package/resources/ecc/skills/security-review/agents/openai.yaml +7 -0
- package/resources/ecc/skills/strategic-compact/SKILL.md +102 -0
- package/resources/ecc/skills/strategic-compact/agents/openai.yaml +7 -0
- package/resources/ecc/skills/tdd-workflow/SKILL.md +409 -0
- package/resources/ecc/skills/tdd-workflow/agents/openai.yaml +7 -0
- package/resources/ecc/skills/verification-loop/SKILL.md +125 -0
- package/resources/ecc/skills/verification-loop/agents/openai.yaml +7 -0
- package/resources/ecc/skills/video-editing/SKILL.md +307 -0
- package/resources/ecc/skills/video-editing/agents/openai.yaml +7 -0
- package/resources/ecc/skills/x-api/SKILL.md +229 -0
- package/resources/ecc/skills/x-api/agents/openai.yaml +7 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: content-engine
|
|
3
|
+
description: Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Content Engine
|
|
7
|
+
|
|
8
|
+
Build platform-native content without flattening the author's real voice into platform slop.
|
|
9
|
+
|
|
10
|
+
## When to Activate
|
|
11
|
+
|
|
12
|
+
- writing X posts or threads
|
|
13
|
+
- drafting LinkedIn posts or launch updates
|
|
14
|
+
- scripting short-form video or YouTube explainers
|
|
15
|
+
- repurposing articles, podcasts, demos, docs, or internal notes into public content
|
|
16
|
+
- building a launch sequence or ongoing content system around a product, insight, or narrative
|
|
17
|
+
|
|
18
|
+
## Non-Negotiables
|
|
19
|
+
|
|
20
|
+
1. Start from source material, not generic post formulas.
|
|
21
|
+
2. Adapt the format for the platform, not the persona.
|
|
22
|
+
3. One post should carry one actual claim.
|
|
23
|
+
4. Specificity beats adjectives.
|
|
24
|
+
5. No engagement bait unless the user explicitly asks for it.
|
|
25
|
+
|
|
26
|
+
## Source-First Workflow
|
|
27
|
+
|
|
28
|
+
Before drafting, identify the source set:
|
|
29
|
+
- published articles
|
|
30
|
+
- notes or internal memos
|
|
31
|
+
- product demos
|
|
32
|
+
- docs or changelogs
|
|
33
|
+
- transcripts
|
|
34
|
+
- screenshots
|
|
35
|
+
- prior posts from the same author
|
|
36
|
+
|
|
37
|
+
If the user wants a specific voice, build a voice profile from real examples before writing.
|
|
38
|
+
Use `brand-voice` as the canonical workflow when voice consistency matters across more than one output.
|
|
39
|
+
|
|
40
|
+
## Voice Handling
|
|
41
|
+
|
|
42
|
+
`brand-voice` is the canonical voice layer.
|
|
43
|
+
|
|
44
|
+
Run it first when:
|
|
45
|
+
|
|
46
|
+
- there are multiple downstream outputs
|
|
47
|
+
- the user explicitly cares about writing style
|
|
48
|
+
- the content is launch, outreach, or reputation-sensitive
|
|
49
|
+
|
|
50
|
+
Reuse the resulting `VOICE PROFILE` here instead of rebuilding a second voice model.
|
|
51
|
+
If the user wants Affaan / ECC voice specifically, still treat `brand-voice` as the source of truth and feed it the best live or source-derived material available.
|
|
52
|
+
|
|
53
|
+
## Hard Bans
|
|
54
|
+
|
|
55
|
+
Delete and rewrite any of these:
|
|
56
|
+
- "In today's rapidly evolving landscape"
|
|
57
|
+
- "game-changer", "revolutionary", "cutting-edge"
|
|
58
|
+
- "here's why this matters" unless it is followed immediately by something concrete
|
|
59
|
+
- ending with a LinkedIn-style question just to farm replies
|
|
60
|
+
- forced casualness on LinkedIn
|
|
61
|
+
- fake engagement padding that was not present in the source material
|
|
62
|
+
|
|
63
|
+
## Platform Adaptation Rules
|
|
64
|
+
|
|
65
|
+
### X
|
|
66
|
+
|
|
67
|
+
- open with the strongest claim, artifact, or tension
|
|
68
|
+
- keep the compression if the source voice is compressed
|
|
69
|
+
- if writing a thread, each post must advance the argument
|
|
70
|
+
- do not pad with context the audience does not need
|
|
71
|
+
|
|
72
|
+
### LinkedIn
|
|
73
|
+
|
|
74
|
+
- expand only enough for people outside the immediate niche to follow
|
|
75
|
+
- do not turn it into a fake lesson post unless the source material actually is reflective
|
|
76
|
+
- no corporate inspiration cadence
|
|
77
|
+
- no praise-stacking, no "journey" filler
|
|
78
|
+
|
|
79
|
+
### Short Video
|
|
80
|
+
|
|
81
|
+
- script around the visual sequence and proof points
|
|
82
|
+
- first seconds should show the result, problem, or punch
|
|
83
|
+
- do not write narration that sounds better on paper than on screen
|
|
84
|
+
|
|
85
|
+
### YouTube
|
|
86
|
+
|
|
87
|
+
- show the result or tension early
|
|
88
|
+
- organize by argument or progression, not filler sections
|
|
89
|
+
- use chaptering only when it helps clarity
|
|
90
|
+
|
|
91
|
+
### Newsletter
|
|
92
|
+
|
|
93
|
+
- open with the point, conflict, or artifact
|
|
94
|
+
- do not spend the first paragraph warming up
|
|
95
|
+
- every section needs to add something new
|
|
96
|
+
|
|
97
|
+
## Repurposing Flow
|
|
98
|
+
|
|
99
|
+
1. Pick the anchor asset.
|
|
100
|
+
2. Extract 3 to 7 atomic claims or scenes.
|
|
101
|
+
3. Rank them by sharpness, novelty, and proof.
|
|
102
|
+
4. Assign one strong idea per output.
|
|
103
|
+
5. Adapt structure for each platform.
|
|
104
|
+
6. Strip platform-shaped filler.
|
|
105
|
+
7. Run the quality gate.
|
|
106
|
+
|
|
107
|
+
## Deliverables
|
|
108
|
+
|
|
109
|
+
When asked for a campaign, return:
|
|
110
|
+
- a short voice profile if voice matching matters
|
|
111
|
+
- the core angle
|
|
112
|
+
- platform-native drafts
|
|
113
|
+
- posting order only if it helps execution
|
|
114
|
+
- gaps that must be filled before publishing
|
|
115
|
+
|
|
116
|
+
## Quality Gate
|
|
117
|
+
|
|
118
|
+
Before delivering:
|
|
119
|
+
- every draft sounds like the intended author, not the platform stereotype
|
|
120
|
+
- every draft contains a real claim, proof point, or concrete observation
|
|
121
|
+
- no generic hype language remains
|
|
122
|
+
- no fake engagement bait remains
|
|
123
|
+
- no duplicated copy across platforms unless requested
|
|
124
|
+
- any CTA is earned and user-approved
|
|
125
|
+
|
|
126
|
+
## Related Skills
|
|
127
|
+
|
|
128
|
+
- `brand-voice` for source-derived voice profiles
|
|
129
|
+
- `crosspost` for platform-specific distribution
|
|
130
|
+
- `x-api` for sourcing recent posts and publishing approved X output
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Content Engine"
|
|
3
|
+
short_description: "Platform-native content systems and campaigns"
|
|
4
|
+
brand_color: "#DC2626"
|
|
5
|
+
default_prompt: "Use $content-engine to turn source material into platform-native content."
|
|
6
|
+
policy:
|
|
7
|
+
allow_implicit_invocation: true
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crosspost
|
|
3
|
+
description: Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Crosspost
|
|
7
|
+
|
|
8
|
+
Distribute content across platforms without turning it into the same fake post in four costumes.
|
|
9
|
+
|
|
10
|
+
## When to Activate
|
|
11
|
+
|
|
12
|
+
- the user wants to publish the same underlying idea across multiple platforms
|
|
13
|
+
- a launch, update, release, or essay needs platform-specific versions
|
|
14
|
+
- the user says "crosspost", "post this everywhere", or "adapt this for X and LinkedIn"
|
|
15
|
+
|
|
16
|
+
## Core Rules
|
|
17
|
+
|
|
18
|
+
1. Do not publish identical copy across platforms.
|
|
19
|
+
2. Preserve the author's voice across platforms.
|
|
20
|
+
3. Adapt for constraints, not stereotypes.
|
|
21
|
+
4. One post should still be about one thing.
|
|
22
|
+
5. Do not invent a CTA, question, or moral if the source did not earn one.
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
### Step 1: Start with the Primary Version
|
|
27
|
+
|
|
28
|
+
Pick the strongest source version first:
|
|
29
|
+
- the original X post
|
|
30
|
+
- the original article
|
|
31
|
+
- the launch note
|
|
32
|
+
- the thread
|
|
33
|
+
- the memo or changelog
|
|
34
|
+
|
|
35
|
+
Use `content-engine` first if the source still needs voice shaping.
|
|
36
|
+
|
|
37
|
+
### Step 2: Capture the Voice Fingerprint
|
|
38
|
+
|
|
39
|
+
Run `brand-voice` first if the source voice is not already captured in the current session.
|
|
40
|
+
|
|
41
|
+
Reuse the resulting `VOICE PROFILE` directly.
|
|
42
|
+
Do not build a second ad hoc voice checklist here unless the user explicitly wants a fresh override for this campaign.
|
|
43
|
+
|
|
44
|
+
### Step 3: Adapt by Platform Constraint
|
|
45
|
+
|
|
46
|
+
### X
|
|
47
|
+
|
|
48
|
+
- keep it compressed
|
|
49
|
+
- lead with the sharpest claim or artifact
|
|
50
|
+
- use a thread only when a single post would collapse the argument
|
|
51
|
+
- avoid hashtags and generic filler
|
|
52
|
+
|
|
53
|
+
### LinkedIn
|
|
54
|
+
|
|
55
|
+
- add only the context needed for people outside the niche
|
|
56
|
+
- do not turn it into a fake founder-reflection post
|
|
57
|
+
- do not add a closing question just because it is LinkedIn
|
|
58
|
+
- do not force a polished "professional tone" if the author is naturally sharper
|
|
59
|
+
|
|
60
|
+
### Threads
|
|
61
|
+
|
|
62
|
+
- keep it readable and direct
|
|
63
|
+
- do not write fake hyper-casual creator copy
|
|
64
|
+
- do not paste the LinkedIn version and shorten it
|
|
65
|
+
|
|
66
|
+
### Bluesky
|
|
67
|
+
|
|
68
|
+
- keep it concise
|
|
69
|
+
- preserve the author's cadence
|
|
70
|
+
- do not rely on hashtags or feed-gaming language
|
|
71
|
+
|
|
72
|
+
## Posting Order
|
|
73
|
+
|
|
74
|
+
Default:
|
|
75
|
+
1. post the strongest native version first
|
|
76
|
+
2. adapt for the secondary platforms
|
|
77
|
+
3. stagger timing only if the user wants sequencing help
|
|
78
|
+
|
|
79
|
+
Do not add cross-platform references unless useful. Most of the time, the post should stand on its own.
|
|
80
|
+
|
|
81
|
+
## Banned Patterns
|
|
82
|
+
|
|
83
|
+
Delete and rewrite any of these:
|
|
84
|
+
- "Excited to share"
|
|
85
|
+
- "Here's what I learned"
|
|
86
|
+
- "What do you think?"
|
|
87
|
+
- "link in bio" unless that is literally true
|
|
88
|
+
- generic "professional takeaway" paragraphs that were not in the source
|
|
89
|
+
|
|
90
|
+
## Output Format
|
|
91
|
+
|
|
92
|
+
Return:
|
|
93
|
+
- the primary platform version
|
|
94
|
+
- adapted variants for each requested platform
|
|
95
|
+
- a short note on what changed and why
|
|
96
|
+
- any publishing constraint the user still needs to resolve
|
|
97
|
+
|
|
98
|
+
## Quality Gate
|
|
99
|
+
|
|
100
|
+
Before delivering:
|
|
101
|
+
- each version reads like the same author under different constraints
|
|
102
|
+
- no platform version feels padded or sanitized
|
|
103
|
+
- no copy is duplicated verbatim across platforms
|
|
104
|
+
- any extra context added for LinkedIn or newsletter use is actually necessary
|
|
105
|
+
|
|
106
|
+
## Related Skills
|
|
107
|
+
|
|
108
|
+
- `brand-voice` for reusable source-derived voice capture
|
|
109
|
+
- `content-engine` for voice capture and source shaping
|
|
110
|
+
- `x-api` for X publishing workflows
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-research
|
|
3
|
+
description: Multi-source deep research using firecrawl and exa MCPs. Searches the web, synthesizes findings, and delivers cited reports with source attribution. Use when the user wants thorough research on any topic with evidence and citations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deep Research
|
|
7
|
+
|
|
8
|
+
Produce thorough, cited research reports from multiple web sources using firecrawl and exa MCP tools.
|
|
9
|
+
|
|
10
|
+
## When to Activate
|
|
11
|
+
|
|
12
|
+
- User asks to research any topic in depth
|
|
13
|
+
- Competitive analysis, technology evaluation, or market sizing
|
|
14
|
+
- Due diligence on companies, investors, or technologies
|
|
15
|
+
- Any question requiring synthesis from multiple sources
|
|
16
|
+
- User says "research", "deep dive", "investigate", or "what's the current state of"
|
|
17
|
+
|
|
18
|
+
## MCP Requirements
|
|
19
|
+
|
|
20
|
+
At least one of:
|
|
21
|
+
- **firecrawl** — `firecrawl_search`, `firecrawl_scrape`, `firecrawl_crawl`
|
|
22
|
+
- **exa** — `web_search_exa`, `web_search_advanced_exa`, `crawling_exa`
|
|
23
|
+
|
|
24
|
+
Both together give the best coverage. Configure in `~/.claude.json` or `~/.codex/config.toml`.
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
### Step 1: Understand the Goal
|
|
29
|
+
|
|
30
|
+
Ask 1-2 quick clarifying questions:
|
|
31
|
+
- "What's your goal — learning, making a decision, or writing something?"
|
|
32
|
+
- "Any specific angle or depth you want?"
|
|
33
|
+
|
|
34
|
+
If the user says "just research it" — skip ahead with reasonable defaults.
|
|
35
|
+
|
|
36
|
+
### Step 2: Plan the Research
|
|
37
|
+
|
|
38
|
+
Break the topic into 3-5 research sub-questions. Example:
|
|
39
|
+
- Topic: "Impact of AI on healthcare"
|
|
40
|
+
- What are the main AI applications in healthcare today?
|
|
41
|
+
- What clinical outcomes have been measured?
|
|
42
|
+
- What are the regulatory challenges?
|
|
43
|
+
- What companies are leading this space?
|
|
44
|
+
- What's the market size and growth trajectory?
|
|
45
|
+
|
|
46
|
+
### Step 3: Execute Multi-Source Search
|
|
47
|
+
|
|
48
|
+
For EACH sub-question, search using available MCP tools:
|
|
49
|
+
|
|
50
|
+
**With firecrawl:**
|
|
51
|
+
```
|
|
52
|
+
firecrawl_search(query: "<sub-question keywords>", limit: 8)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**With exa:**
|
|
56
|
+
```
|
|
57
|
+
web_search_exa(query: "<sub-question keywords>", numResults: 8)
|
|
58
|
+
web_search_advanced_exa(query: "<keywords>", numResults: 5, startPublishedDate: "2025-01-01")
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Search strategy:**
|
|
62
|
+
- Use 2-3 different keyword variations per sub-question
|
|
63
|
+
- Mix general and news-focused queries
|
|
64
|
+
- Aim for 15-30 unique sources total
|
|
65
|
+
- Prioritize: academic, official, reputable news > blogs > forums
|
|
66
|
+
|
|
67
|
+
### Step 4: Deep-Read Key Sources
|
|
68
|
+
|
|
69
|
+
For the most promising URLs, fetch full content:
|
|
70
|
+
|
|
71
|
+
**With firecrawl:**
|
|
72
|
+
```
|
|
73
|
+
firecrawl_scrape(url: "<url>")
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**With exa:**
|
|
77
|
+
```
|
|
78
|
+
crawling_exa(url: "<url>", tokensNum: 5000)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Read 3-5 key sources in full for depth. Do not rely only on search snippets.
|
|
82
|
+
|
|
83
|
+
### Step 5: Synthesize and Write Report
|
|
84
|
+
|
|
85
|
+
Structure the report:
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
# [Topic]: Research Report
|
|
89
|
+
*Generated: [date] | Sources: [N] | Confidence: [High/Medium/Low]*
|
|
90
|
+
|
|
91
|
+
## Executive Summary
|
|
92
|
+
[3-5 sentence overview of key findings]
|
|
93
|
+
|
|
94
|
+
## 1. [First Major Theme]
|
|
95
|
+
[Findings with inline citations]
|
|
96
|
+
- Key point ([Source Name](url))
|
|
97
|
+
- Supporting data ([Source Name](url))
|
|
98
|
+
|
|
99
|
+
## 2. [Second Major Theme]
|
|
100
|
+
...
|
|
101
|
+
|
|
102
|
+
## 3. [Third Major Theme]
|
|
103
|
+
...
|
|
104
|
+
|
|
105
|
+
## Key Takeaways
|
|
106
|
+
- [Actionable insight 1]
|
|
107
|
+
- [Actionable insight 2]
|
|
108
|
+
- [Actionable insight 3]
|
|
109
|
+
|
|
110
|
+
## Sources
|
|
111
|
+
1. [Title](url) — [one-line summary]
|
|
112
|
+
2. ...
|
|
113
|
+
|
|
114
|
+
## Methodology
|
|
115
|
+
Searched [N] queries across web and news. Analyzed [M] sources.
|
|
116
|
+
Sub-questions investigated: [list]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Step 6: Deliver
|
|
120
|
+
|
|
121
|
+
- **Short topics**: Post the full report in chat
|
|
122
|
+
- **Long reports**: Post the executive summary + key takeaways, save full report to a file
|
|
123
|
+
|
|
124
|
+
## Parallel Research with Subagents
|
|
125
|
+
|
|
126
|
+
For broad topics, use Claude Code's Task tool to parallelize:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Launch 3 research agents in parallel:
|
|
130
|
+
1. Agent 1: Research sub-questions 1-2
|
|
131
|
+
2. Agent 2: Research sub-questions 3-4
|
|
132
|
+
3. Agent 3: Research sub-question 5 + cross-cutting themes
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Each agent searches, reads sources, and returns findings. The main session synthesizes into the final report.
|
|
136
|
+
|
|
137
|
+
## Quality Rules
|
|
138
|
+
|
|
139
|
+
1. **Every claim needs a source.** No unsourced assertions.
|
|
140
|
+
2. **Cross-reference.** If only one source says it, flag it as unverified.
|
|
141
|
+
3. **Recency matters.** Prefer sources from the last 12 months.
|
|
142
|
+
4. **Acknowledge gaps.** If you couldn't find good info on a sub-question, say so.
|
|
143
|
+
5. **No hallucination.** If you don't know, say "insufficient data found."
|
|
144
|
+
6. **Separate fact from inference.** Label estimates, projections, and opinions clearly.
|
|
145
|
+
|
|
146
|
+
## Examples
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
"Research the current state of nuclear fusion energy"
|
|
150
|
+
"Deep dive into Rust vs Go for backend services in 2026"
|
|
151
|
+
"Research the best strategies for bootstrapping a SaaS business"
|
|
152
|
+
"What's happening with the US housing market right now?"
|
|
153
|
+
"Investigate the competitive landscape for AI code editors"
|
|
154
|
+
```
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dmux-workflows
|
|
3
|
+
description: Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# dmux Workflows
|
|
7
|
+
|
|
8
|
+
Orchestrate parallel AI agent sessions using dmux, a tmux pane manager for agent harnesses.
|
|
9
|
+
|
|
10
|
+
## When to Activate
|
|
11
|
+
|
|
12
|
+
- Running multiple agent sessions in parallel
|
|
13
|
+
- Coordinating work across Claude Code, Codex, and other harnesses
|
|
14
|
+
- Complex tasks that benefit from divide-and-conquer parallelism
|
|
15
|
+
- User says "run in parallel", "split this work", "use dmux", or "multi-agent"
|
|
16
|
+
|
|
17
|
+
## What is dmux
|
|
18
|
+
|
|
19
|
+
dmux is a tmux-based orchestration tool that manages AI agent panes:
|
|
20
|
+
- Press `n` to create a new pane with a prompt
|
|
21
|
+
- Press `m` to merge pane output back to the main session
|
|
22
|
+
- Supports: Claude Code, Codex, OpenCode, Cline, Gemini, Qwen
|
|
23
|
+
|
|
24
|
+
**Install:** `npm install -g dmux` or see [github.com/standardagents/dmux](https://github.com/standardagents/dmux)
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Start dmux session
|
|
30
|
+
dmux
|
|
31
|
+
|
|
32
|
+
# Create agent panes (press 'n' in dmux, then type prompt)
|
|
33
|
+
# Pane 1: "Implement the auth middleware in src/auth/"
|
|
34
|
+
# Pane 2: "Write tests for the user service"
|
|
35
|
+
# Pane 3: "Update API documentation"
|
|
36
|
+
|
|
37
|
+
# Each pane runs its own agent session
|
|
38
|
+
# Press 'm' to merge results back
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Workflow Patterns
|
|
42
|
+
|
|
43
|
+
### Pattern 1: Research + Implement
|
|
44
|
+
|
|
45
|
+
Split research and implementation into parallel tracks:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Pane 1 (Research): "Research best practices for rate limiting in Node.js.
|
|
49
|
+
Check current libraries, compare approaches, and write findings to
|
|
50
|
+
/tmp/rate-limit-research.md"
|
|
51
|
+
|
|
52
|
+
Pane 2 (Implement): "Implement rate limiting middleware for our Express API.
|
|
53
|
+
Start with a basic token bucket, we'll refine after research completes."
|
|
54
|
+
|
|
55
|
+
# After Pane 1 completes, merge findings into Pane 2's context
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Pattern 2: Multi-File Feature
|
|
59
|
+
|
|
60
|
+
Parallelize work across independent files:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Pane 1: "Create the database schema and migrations for the billing feature"
|
|
64
|
+
Pane 2: "Build the billing API endpoints in src/api/billing/"
|
|
65
|
+
Pane 3: "Create the billing dashboard UI components"
|
|
66
|
+
|
|
67
|
+
# Merge all, then do integration in main pane
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Pattern 3: Test + Fix Loop
|
|
71
|
+
|
|
72
|
+
Run tests in one pane, fix in another:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Pane 1 (Watcher): "Run the test suite in watch mode. When tests fail,
|
|
76
|
+
summarize the failures."
|
|
77
|
+
|
|
78
|
+
Pane 2 (Fixer): "Fix failing tests based on the error output from pane 1"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Pattern 4: Cross-Harness
|
|
82
|
+
|
|
83
|
+
Use different AI tools for different tasks:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Pane 1 (Claude Code): "Review the security of the auth module"
|
|
87
|
+
Pane 2 (Codex): "Refactor the utility functions for performance"
|
|
88
|
+
Pane 3 (Claude Code): "Write E2E tests for the checkout flow"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Pattern 5: Code Review Pipeline
|
|
92
|
+
|
|
93
|
+
Parallel review perspectives:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
Pane 1: "Review src/api/ for security vulnerabilities"
|
|
97
|
+
Pane 2: "Review src/api/ for performance issues"
|
|
98
|
+
Pane 3: "Review src/api/ for test coverage gaps"
|
|
99
|
+
|
|
100
|
+
# Merge all reviews into a single report
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Best Practices
|
|
104
|
+
|
|
105
|
+
1. **Independent tasks only.** Don't parallelize tasks that depend on each other's output.
|
|
106
|
+
2. **Clear boundaries.** Each pane should work on distinct files or concerns.
|
|
107
|
+
3. **Merge strategically.** Review pane output before merging to avoid conflicts.
|
|
108
|
+
4. **Use git worktrees.** For file-conflict-prone work, use separate worktrees per pane.
|
|
109
|
+
5. **Resource awareness.** Each pane uses API tokens — keep total panes under 5-6.
|
|
110
|
+
|
|
111
|
+
## Git Worktree Integration
|
|
112
|
+
|
|
113
|
+
For tasks that touch overlapping files:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Create worktrees for isolation
|
|
117
|
+
git worktree add ../feature-auth feat/auth
|
|
118
|
+
git worktree add ../feature-billing feat/billing
|
|
119
|
+
|
|
120
|
+
# Run agents in separate worktrees
|
|
121
|
+
# Pane 1: cd ../feature-auth && claude
|
|
122
|
+
# Pane 2: cd ../feature-billing && claude
|
|
123
|
+
|
|
124
|
+
# Merge branches when done
|
|
125
|
+
git merge feat/auth
|
|
126
|
+
git merge feat/billing
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Complementary Tools
|
|
130
|
+
|
|
131
|
+
| Tool | What It Does | When to Use |
|
|
132
|
+
|------|-------------|-------------|
|
|
133
|
+
| **dmux** | tmux pane management for agents | Parallel agent sessions |
|
|
134
|
+
| **Superset** | Terminal IDE for 10+ parallel agents | Large-scale orchestration |
|
|
135
|
+
| **Claude Code Task tool** | In-process subagent spawning | Programmatic parallelism within a session |
|
|
136
|
+
| **Codex multi-agent** | Built-in agent roles | Codex-specific parallel work |
|
|
137
|
+
|
|
138
|
+
## Troubleshooting
|
|
139
|
+
|
|
140
|
+
- **Pane not responding:** Check if the agent session is waiting for input. Use `m` to read output.
|
|
141
|
+
- **Merge conflicts:** Use git worktrees to isolate file changes per pane.
|
|
142
|
+
- **High token usage:** Reduce number of parallel panes. Each pane is a full agent session.
|
|
143
|
+
- **tmux not found:** Install with `brew install tmux` (macOS) or `apt install tmux` (Linux).
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documentation-lookup
|
|
3
|
+
description: Use up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the user names a framework (e.g. React, Next.js, Prisma).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documentation Lookup (Context7)
|
|
7
|
+
|
|
8
|
+
When the user asks about libraries, frameworks, or APIs, fetch current documentation via the Context7 MCP (tools `resolve-library-id` and `query-docs`) instead of relying on training data.
|
|
9
|
+
|
|
10
|
+
## Core Concepts
|
|
11
|
+
|
|
12
|
+
- **Context7**: MCP server that exposes live documentation; use it instead of training data for libraries and APIs.
|
|
13
|
+
- **resolve-library-id**: Returns Context7-compatible library IDs (e.g. `/vercel/next.js`) from a library name and query.
|
|
14
|
+
- **query-docs**: Fetches documentation and code snippets for a given library ID and question. Always call resolve-library-id first to get a valid library ID.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
Activate when the user:
|
|
19
|
+
|
|
20
|
+
- Asks setup or configuration questions (e.g. "How do I configure Next.js middleware?")
|
|
21
|
+
- Requests code that depends on a library ("Write a Prisma query for...")
|
|
22
|
+
- Needs API or reference information ("What are the Supabase auth methods?")
|
|
23
|
+
- Mentions specific frameworks or libraries (React, Vue, Svelte, Express, Tailwind, Prisma, Supabase, etc.)
|
|
24
|
+
|
|
25
|
+
Use this skill whenever the request depends on accurate, up-to-date behavior of a library, framework, or API. Applies across harnesses that have the Context7 MCP configured (e.g. Claude Code, Cursor, Codex).
|
|
26
|
+
|
|
27
|
+
## How it works
|
|
28
|
+
|
|
29
|
+
### Step 1: Resolve the Library ID
|
|
30
|
+
|
|
31
|
+
Call the **resolve-library-id** MCP tool with:
|
|
32
|
+
|
|
33
|
+
- **libraryName**: The library or product name taken from the user's question (e.g. `Next.js`, `Prisma`, `Supabase`).
|
|
34
|
+
- **query**: The user's full question. This improves relevance ranking of results.
|
|
35
|
+
|
|
36
|
+
You must obtain a Context7-compatible library ID (format `/org/project` or `/org/project/version`) before querying docs. Do not call query-docs without a valid library ID from this step.
|
|
37
|
+
|
|
38
|
+
### Step 2: Select the Best Match
|
|
39
|
+
|
|
40
|
+
From the resolution results, choose one result using:
|
|
41
|
+
|
|
42
|
+
- **Name match**: Prefer exact or closest match to what the user asked for.
|
|
43
|
+
- **Benchmark score**: Higher scores indicate better documentation quality (100 is highest).
|
|
44
|
+
- **Source reputation**: Prefer High or Medium reputation when available.
|
|
45
|
+
- **Version**: If the user specified a version (e.g. "React 19", "Next.js 15"), prefer a version-specific library ID if listed (e.g. `/org/project/v1.2.0`).
|
|
46
|
+
|
|
47
|
+
### Step 3: Fetch the Documentation
|
|
48
|
+
|
|
49
|
+
Call the **query-docs** MCP tool with:
|
|
50
|
+
|
|
51
|
+
- **libraryId**: The selected Context7 library ID from Step 2 (e.g. `/vercel/next.js`).
|
|
52
|
+
- **query**: The user's specific question or task. Be specific to get relevant snippets.
|
|
53
|
+
|
|
54
|
+
Limit: do not call query-docs (or resolve-library-id) more than 3 times per question. If the answer is unclear after 3 calls, state the uncertainty and use the best information you have rather than guessing.
|
|
55
|
+
|
|
56
|
+
### Step 4: Use the Documentation
|
|
57
|
+
|
|
58
|
+
- Answer the user's question using the fetched, current information.
|
|
59
|
+
- Include relevant code examples from the docs when helpful.
|
|
60
|
+
- Cite the library or version when it matters (e.g. "In Next.js 15...").
|
|
61
|
+
|
|
62
|
+
## Examples
|
|
63
|
+
|
|
64
|
+
### Example: Next.js middleware
|
|
65
|
+
|
|
66
|
+
1. Call **resolve-library-id** with `libraryName: "Next.js"`, `query: "How do I set up Next.js middleware?"`.
|
|
67
|
+
2. From results, pick the best match (e.g. `/vercel/next.js`) by name and benchmark score.
|
|
68
|
+
3. Call **query-docs** with `libraryId: "/vercel/next.js"`, `query: "How do I set up Next.js middleware?"`.
|
|
69
|
+
4. Use the returned snippets and text to answer; include a minimal `middleware.ts` example from the docs if relevant.
|
|
70
|
+
|
|
71
|
+
### Example: Prisma query
|
|
72
|
+
|
|
73
|
+
1. Call **resolve-library-id** with `libraryName: "Prisma"`, `query: "How do I query with relations?"`.
|
|
74
|
+
2. Select the official Prisma library ID (e.g. `/prisma/prisma`).
|
|
75
|
+
3. Call **query-docs** with that `libraryId` and the query.
|
|
76
|
+
4. Return the Prisma Client pattern (e.g. `include` or `select`) with a short code snippet from the docs.
|
|
77
|
+
|
|
78
|
+
### Example: Supabase auth methods
|
|
79
|
+
|
|
80
|
+
1. Call **resolve-library-id** with `libraryName: "Supabase"`, `query: "What are the auth methods?"`.
|
|
81
|
+
2. Pick the Supabase docs library ID.
|
|
82
|
+
3. Call **query-docs**; summarize the auth methods and show minimal examples from the fetched docs.
|
|
83
|
+
|
|
84
|
+
## Best Practices
|
|
85
|
+
|
|
86
|
+
- **Be specific**: Use the user's full question as the query where possible for better relevance.
|
|
87
|
+
- **Version awareness**: When users mention versions, use version-specific library IDs from the resolve step when available.
|
|
88
|
+
- **Prefer official sources**: When multiple matches exist, prefer official or primary packages over community forks.
|
|
89
|
+
- **No sensitive data**: Redact API keys, passwords, tokens, and other secrets from any query sent to Context7. Treat the user's question as potentially containing secrets before passing it to resolve-library-id or query-docs.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Documentation Lookup"
|
|
3
|
+
short_description: "Current library docs via Context7"
|
|
4
|
+
brand_color: "#6366F1"
|
|
5
|
+
default_prompt: "Use $documentation-lookup to fetch current library documentation via Context7."
|
|
6
|
+
policy:
|
|
7
|
+
allow_implicit_invocation: true
|