Skip to content

fix(cli): align find-docs skill with context7-cli rule guidance#2863

Merged
enesgules merged 1 commit into
upstash:masterfrom
syf2211:fix/2860-align-find-docs-skill-with-cli-rule
Jul 3, 2026
Merged

fix(cli): align find-docs skill with context7-cli rule guidance#2863
enesgules merged 1 commit into
upstash:masterfrom
syf2211:fix/2860-align-find-docs-skill-with-cli-rule

Conversation

@syf2211

@syf2211 syf2211 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Align the generated find-docs skill with the companion context7-cli rule so ctx7 setup --claude --cli produces consistent guidance.

Motivation

Fixes #2860. The setup flow writes both find-docs/SKILL.md and ~/.claude/rules/context7.md, but they previously diverged:

  • The skill recommended npm install -g ctx7@latest and bare ctx7 commands
  • The skill examples used lowercase library slugs like nextjs and react
  • The rule recommends npx ctx7@latest and official library punctuation (e.g. "Next.js" not "nextjs")

Because both files are regenerated on setup, the canonical skill source needed to match the rule.

Changes

  • Update skills/find-docs/SKILL.md to use npx ctx7@latest as the canonical invocation style
  • Add official library naming guidance matching rules/context7-cli.md
  • Move global npm install -g to an optional secondary path
  • Add regression tests in packages/cli/src/__tests__/find-docs-skill-alignment.test.ts

Tests

cd packages/cli && npx vitest run src/__tests__/find-docs-skill-alignment.test.ts
# 3 passed
cd packages/cli && npx vitest run
# 235 passed

Notes

Documentation-only change to the canonical skill template. Users receive the fix after the next skill re-download/update triggered by setup.

Fixes upstash#2860

- Use npx ctx7@latest as the canonical CLI invocation in find-docs SKILL.md
- Add official library naming guidance matching rules/context7-cli.md
- De-emphasize global npm install as the primary workflow
- Add regression tests to keep skill and rule guidance aligned
@enesgules

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

@enesgules enesgules merged commit 84620bd into upstash:master Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ctx7 setup --claude: generated find-docs skill contradicts its own companion rule's guidance

3 participants