$npx -y skills add wednesday-solutions/ai-agent-skills --skill codebase-intelUnified codebase intelligence. Handles all questions about structure, logic, risk, and dependencies. Combines natural-language Q&A with deterministic lookups and pre-edit blast radius checks.
| 1 | # Codebase Intelligence Specialist |
| 2 | |
| 3 | This skill provides a comprehensive understanding of the project's structure, intent, and risk. Use it for everything from high-level architecture questions to detailed impact analysis before editing code. |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | ### 1. Codebase Discovery & Q&A |
| 8 | - "What does `tokenService` do?" (Summaries) |
| 9 | - "Where is the payment logic located?" (Role/Path mapping) |
| 10 | - "Show me an overview of the architecture." (Stats & Entry points) |
| 11 | - "Who last touched this file?" (Git history) |
| 12 | - "Find circular dependencies or dead code." (Structural audit) |
| 13 | |
| 14 | ### 2. Risk Assessment (Before Editing) |
| 15 | - "Is it safe to change this function signature?" |
| 16 | - "What is the blast radius of this file?" |
| 17 | - "What will break if I delete this constant?" |
| 18 | |
| 19 | ### 3. Graph Maintenance |
| 20 | - If a query returns "not mapped" or coverage is low. |
| 21 | - If you notice missing dependencies in the graph. |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## How to use — by task type |
| 26 | |
| 27 | ### 🔍 Discovery & Q&A |
| 28 | 1. **File Summary**: `Bash(wednesday-skills query getFileSummary <file_path>)` |
| 29 | - Returns: Role, Summary, Risk Score, and Blast Radius. |
| 30 | 2. **Architecture Stats**: `Bash(wednesday-skills query getCodebaseStats)` |
| 31 | - Use `getHighConfidenceEntryPoints` to identify the best starting files. |
| 32 | 3. **Advanced Lookups**: |
| 33 | - `Bash(wednesday-skills query getHighRiskFiles 70)` — find critical technical debt. |
| 34 | - `Bash(wednesday-skills query getCircularDependencies)` — find architectural smells. |
| 35 | - `Bash(wednesday-skills query getAllDeadCode)` — find unreachable modules. |
| 36 | 4. **Context**: `Read .wednesday/codebase/MASTER.md` for danger zones and primary data flows. |
| 37 | 5. **History**: `Bash(git log --follow --oneline -20 -- <file>)` for authorship. |
| 38 | |
| 39 | ### ⚠️ Pre-Edit Safety Check (Mandatory) |
| 40 | Before modifying any file, you MUST perform these checks: |
| 41 | 1. **Check Risk**: `Bash(wednesday-skills query getFileSummary <file_path>)` |
| 42 | - **Score 0–30**: Proceed directly. |
| 43 | - **Score 31–60**: Inform dev of the risk, proceed with care. |
| 44 | - **Score 61–80**: List direct dependents and transitive count; ask confirmation. |
| 45 | - **Score 81–100**: **STOP**. Require explicit dev approval before touching. |
| 46 | 2. **Blast Radius**: `Bash(wednesday-skills blast <file_path>::<symbol_optional>)` |
| 47 | - Review direct/transitive callers. Use this for cross-language impact (Go/Py/JS). |
| 48 | |
| 49 | ### 🛠 Graph Maintenance & Gaps |
| 50 | If you hit "not mapped" or detect a missing link: |
| 51 | 1. **Gap Check**: `Bash(sqlite3 .wednesday/graph.db "SELECT file_path, meta FROM nodes WHERE file_path LIKE '%<file>%'")` |
| 52 | - Check `meta` for `gaps.eventEmitter`, `gaps.dynamic`, etc. |
| 53 | 2. **Fill Gaps**: `Bash(wednesday-skills fill-gaps --file <file> --min-risk 50)` |
| 54 | - *Rule*: Only edges with confidence > 0.70 are added automatically. |
| 55 | 3. **Annotations**: If gaps persist, ask dev to add `// @wednesday-skills:connects-to <symbol> → <file>`. |
| 56 | 4. **Refresh**: `Bash(wednesday-skills analyze --incremental)` after adding annotations. |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ## 🚫 Never |
| 61 | - **Guess**: If data is missing, report "Not mapped" and suggest `wednesday-skills map --full`. |
| 62 | - **Skip Checks**: Never edit a file with risk > 80 without explicit dev confirmation. |
| 63 | - **Token Bloat**: Do NOT read raw source files to answer structural questions. |
| 64 | - **Add Unreliable Edges**: Never manually add edges with confidence below 0.70. |
| 65 | |
| 66 | ## 📄 Source Citation |
| 67 | Always end with the source: |
| 68 | - `graph.db` — Structural/Summary data |
| 69 | - `MASTER.md` — Architectural context |
| 70 | - `git log` — History/Authorship |