Improve CLI experience: enhanced skills + fix --version/-v flag handling#10
Improve CLI experience: enhanced skills + fix --version/-v flag handling#10TheophilusChinomona wants to merge 3 commits intoVedanthB:mainfrom
Conversation
…, and troubleshooting
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request adds two new skill definition files to document Context7 CLI capabilities. The changes introduce skill metadata and comprehensive usage documentation for the ChangesSkills Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the Context7 CLI “skill” documentation to provide richer, more actionable usage guidance for c7 docs and c7 resolve, and aligns the release intent with the reported --version/-v flag issue from #9.
Changes:
- Add/expand
.kilo/skills/context7-docs/SKILL.mdwith more examples (piping, troubleshooting, automation patterns). - Add/expand
.kilo/skills/context7-resolve/SKILL.mdwith JSON usage, chaining patterns, and error-handling guidance.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| .kilo/skills/context7-docs/SKILL.md | Adds expanded “docs” skill guidance (examples, troubleshooting, workflow integration). |
| .kilo/skills/context7-resolve/SKILL.md | Adds expanded “resolve” skill guidance (JSON output, chaining into docs, automation patterns). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: context7-resolve | ||
| description: Find Context7 library IDs for a given library name. Use when you need to resolve library names to their Context7 identifiers for documentation retrieval. | ||
| license: MIT | ||
| compatibility: Requires Node.js >=18 and the @vedanth/context7 package installed |
| | Option | Description | Default | | ||
| |--------|-------------|---------| | ||
| | `--json` | Output raw JSON instead of formatted text | off | | ||
| | `--api-key <key>` | Context7 API key (or set CONTEXT7_API_KEY env var) | none | | ||
|
|
|
|
||
| ```bash | ||
| # Resolve, extract ID, then fetch docs | ||
| ID=$(c7 resolve react --json | node -e "process.stdin.on('data',d=>console.log(JSON.parse(d)[0].id))") |
|
|
||
| docs: | ||
| c7 docs $(shell c7 resolve $(LIB) --json | node -e "process.stdin.on('data',d=>console.log(JSON.parse(d)[0].id))") "$(TOPIC)" | ||
| ``` |
| # fetch-docs.sh — resolve and fetch docs in one step | ||
| LIB=$1 | ||
| TOPIC=$2 | ||
| ID=$(npx @vedanth/context7 r "$LIB" --json | node -e "process.stdin.on('data',d=>console.log(JSON.parse(d)[0].id))") | ||
| npx @vedanth/context7 docs "$ID" "$TOPIC" | ||
| ``` |
| | Error | Cause | Fix | | ||
| |-------|-------|-----| | ||
| | "No libraries found for X" | Library not in Context7 index | Try synonyms, check spelling, or use a more general query | | ||
| | "Search failed: 429" | Rate limited | Set `CONTEXT7_API_KEY` for higher limits | | ||
| | "Error: fetch failed" | Network issue | Check internet connection | | ||
| | "command not found: c7" | CLI not installed | Use `npx @vedanth/context7` or run `npm install -g @vedanth/context7` | | ||
|
|
| | Common Name | Context7 ID | | ||
| |-------------|-------------| | ||
| | react | `/facebook/react` | | ||
| | nextjs | `/vercel/next.js` | | ||
| | express | `/expressjs/express` | | ||
| | tailwindcss | `/tailwindlabs/tailwindcss` | | ||
| | vue | `/vuejs/core` | | ||
| | prisma | `/prisma/prisma` | | ||
| | lodash | `/lodash/lodash` | |
| name: context7-docs | ||
| description: Get documentation for a library from Context7. Use when you need up-to-date library documentation, API references, code examples, or specific topic information from Context7. | ||
| license: MIT | ||
| compatibility: Requires Node.js >=18 and the @vedanth/context7 package installed |
| 3. **With Editor Integration** | ||
| ```bash | ||
| # Create helper scripts for your editor | ||
| echo '#!/bin/bash\nc7 "$@"' > ~/bin/context7-search |
| --- | ||
| name: context7-docs | ||
| description: Get documentation for a library from Context7. Use when you need up-to-date library documentation, API references, code examples, or specific topic information from Context7. | ||
| license: MIT | ||
| compatibility: Requires Node.js >=18 and the @vedanth/context7 package installed | ||
| metadata: | ||
| author: Kilo | ||
| version: "1.0.1" | ||
| allowed-tools: Bash | ||
| --- |
…heredoc, version bump
|
All copilot review comments addressed in 7f5ed56:
|
Summary
Two changes to improve the Context7 CLI developer experience:
1. Enhanced .kilo/skills/ (CLI Agent Skills)
Improves both context7-docs and context7-resolve skills with:
2. Fix: --version / -v Flag Handling (bin/c7.js)
The npm-published v1.0.2 of @vedanth/context7 is missing --version/-v flag support. The fix already exists in the repo source but was omitted from the npm tarball. Two blocks need inclusion in the next npm publish:
Related
Closes #9
Summary by CodeRabbit