

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567# External Library Documentation Requirements89- **ALWAYS Use Context7 Before Using External Libraries**1011 - The agent MUST retrieve and review documentation via Context7 before implementing any code that uses an external library12 - This applies to ALL libraries not part of the standard language libraries13 - No exceptions - even for commonly known libraries like React, Express, or Lodash1415- **Two-Step Documentation Retrieval Process**1617```javascript18 // ✅ DO: ALWAYS follow this exact two-step process19 // Step 1: Resolve the library name to a Context7-compatible ID20 const libraryIdResponse =21 await mcp_context7_resolve-library-id({22 libraryName: "express",23 });2425 // Step 2: Get the documentation using the resolved ID26 const docsResponse =27 await mcp_context7_get-library-docs({28 context7CompatibleLibraryID: libraryIdResponse.libraryId,29 tokens: 10000, // Adjust based on documentation needs30 topic: "routing", // Optional: focus on specific area31 });3233 // ❌ DON'T: Skip the resolution step34 // ❌ DON'T: Use hardcoded library IDs35 // ❌ DON'T: Proceed with implementation without review36```3738- **Never Skip Documentation Retrieval**3940 - Documentation MUST be retrieved even for seemingly simple APIs41 - Do not rely on previously cached knowledge for current implementations42 - Never make assumptions about library interfaces, verify with current documentation4344- **Document First, Implement Second**4546```javascript47 // ✅ DO: Review documentation BEFORE writing implementation code48 // 1. Identify library need49 // 2. Retrieve documentation50 // 3. Review relevant sections51 // 4. THEN implement solution5253 // ❌ DON'T: Implementation without documentation54 const app = express(); // WRONG - Documentation not retrieved first55 app.get("/", (req, res) => res.send("Hello"));56```5758- **Verify API Compatibility**5960 - Always check current API version compatibility61 - Validate method signatures against retrieved documentation62 - Verify required dependencies and peer dependencies6364- **Handle Documentation Response Properly**6566```javascript67 // ✅ DO: Properly handle the documentation response68 const docsResponse =69 await mcp_context7_get-library-docs({70 context7CompatibleLibraryID: "vercel/nextjs",71 });7273 // Extract relevant information74 const sections = docsResponse.content.sections;75 const examples = sections.filter((s) => s.type === "example");76 const apiDocs = sections.filter((s) => s.type === "api");7778 // Use this for implementation guidance79 // ...8081 // ❌ DON'T: Ignore retrieved documentation82 // ❌ DON'T: Proceed with implementation based on assumptions83```8485- **Required Documentation Review Checklist**8687 - Core API functions and methods must be verified88 - Method signatures and parameters must be validated89 - Return values and types must be confirmed90 - Required configuration must be identified91 - Common patterns and examples must be analyzed9293- **Example Implementation Flow**9495```javascript96 // ✅ DO: Follow this implementation flow9798 // 1. Identify need for external library99 // "I need to implement JWT authentication in Express"100101 // 2. Resolve library IDs for ALL needed libraries102 const expressLibrary =103 await mcp_context7_resolve-library-id({104 libraryName: "express",105 });106107 const jwtLibrary =108 await mcp_context7_resolve-library-id({109 libraryName: "jsonwebtoken",110 });111112 // 3. Retrieve documentation for ALL libraries113 const expressDocs =114 await mcp_context7_get-library-docs({115 context7CompatibleLibraryID: expressLibrary.libraryId,116 });117118 const jwtDocs =119 await mcp_context7_get-library -120 docs({121 context7CompatibleLibraryID: jwtLibrary.libraryId,122 topic: "authentication",123 });124125 // 4. Review documentation and extract implementation details126 // 5. Create implementation with proper reference to documentation127128 // ❌ DON'T: Skip any library in multi-library implementations129```130131- **Documentation First for Dependency Resolution**132133 - All transitive dependencies must be documented134 - Version compatibility must be verified135 - Properly handle conflicting dependencies136137- **Update Implementation After Documentation Review**138139```javascript140 // ✅ DO: Update existing code based on documentation141 // If reviewing code that uses libraries without proper documentation:142143 // 1. Retrieve documentation for used libraries144 // 2. Verify existing implementation against documentation145 // 3. Correct any discrepancies found146147 // ❌ DON'T: Assume existing implementation is correct148 // ❌ DON'T: Skip verification of existing library usage149```150151- **MUST Use Web Search When Documentation Is Unavailable**152153 - If Context7 cannot provide documentation or returns insufficient information, the agent MUST use the web search tool154 - Always search for the most recent documentation as of mid-2025155 - Verify the library version against the latest available release156157```javascript158 // ✅ DO: Fallback to web search when Context7 fails159 try {160 // First attempt to use Context7161 const libraryIdResponse =162 (await mcp_context7_resolve-library-id({163 libraryName: "some-library",164 });165166 const docsResponse =167 (await mcp_context7_get-library-docs({168 context7CompatibleLibraryID: libraryIdResponse.libraryId,169 });170171 // Check if documentation is insufficient172 if (!docsResponse.content || docsResponse.content.length < 100) {173 throw new Error("Insufficient documentation");174 }175 } catch (error) {176 // If Context7 fails or returns insufficient docs, use web search177 const webResults = await web_search({178 search_term: "some-library latest documentation api reference mid 2025",179 explanation: "Context7 documentation was unavailable or insufficient",180 });181182 // Analyze multiple search results to get comprehensive information183 const latestDocs = webResults.filter(184 (result) =>185 result.includes("documentation") ||186 result.includes("api reference") ||187 result.includes("guide")188 );189190 // Use these web results to guide implementation191 }192193 // ❌ DON'T: Skip web search when Context7 fails194 // ❌ DON'T: Proceed with implementation without documentation195 // ❌ DON'T: Use outdated web search results (verify they're current as of mid-2025)196```197198- **Web Search Requirements**199200 - Search queries MUST include:201 - Library name202 - "latest documentation" or "api reference"203 - Version information (if known)204 - "mid 2025" to get the most recent documentation205 - Multiple searches may be needed to gather comprehensive information206 - Verify information from at least 2-3 reputable sources when possible207 - Consider official documentation, GitHub repositories, and trusted developer resources208209- **Synthesize Documentation From Multiple Sources**210211 - When using web search, compile information from multiple sources212 - Prioritize official documentation sources213 - Cross-reference information to ensure accuracy214 - Document any discrepancies found between sources215216```javascript217 // ✅ DO: Synthesize documentation from multiple sources218 const webResults = [219 await web_search({220 search_term: "library-name official documentation mid 2025",221 explanation: "Finding official documentation",222 }),223 await web_search({224 search_term: "library-name GitHub README api reference mid 2025",225 explanation: "Finding GitHub documentation",226 }),227 await web_search({228 search_term: "library-name latest tutorial examples mid 2025",229 explanation: "Finding practical examples",230 }),231 ];232233 // Analyze and synthesize the results234 // Extract API details, examples, and best practices235 // Document any conflicting information236237 // ❌ DON'T: Rely on a single search result238 // ❌ DON'T: Skip verification across multiple sources239```240
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| aiurda/devcontext.cursor/rules/020-tasks-workflow.mdc · 47 | Cursor rules | archagent-behaviour | 58/100 | 13 days ago | |
| aiurda/devcontext.cursor/rules/200-cursor-rules.mdc · 47 | Cursor rules | no sections | 36/100 | 13 days ago | |
| aiurda/devcontext.cursorrules · 47 | .cursorrules | archdo-notagent-behaviourdocs | 65/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/aiurda-devcontext-cursor-rules-010-documentation-context)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.