ask-expert
Skill2 starsChanged 9 months agoMITView on GitHub
Creates expert consultation documents with code extraction, git diffs, and size tracking (125KB limit). Use when user asks to "create an expert consultation document", "prepare code for expert review", "gather architecture context", or needs comprehensive technical documentation for external analysis. Requires Node.js 18+.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-depsSkill
- debriefSkill
- deep-interviewSkill
- mine-historySkill
- pr-audit-anglesSkill
- pr-fix-anglesSkill
- trim-prSkill
- update-prSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Create comprehensive technical consultation documents by extracting code, diffs, and architectural context within LLM token limits (125KB).
- Very specific: line 43
Create a descriptive file like {topic}-consultation.md with the problem context, your solution, concerns, alternatives, and an architecture …
- Distinctive: line 47
Use the bundled extraction script with size tracking.
- Very specific: line 65
Commit changes: --commit=abc123 or --commit=HEAD~1
- Very specific: line 68
All branch changes: --branch-diff=master (auto-resolves merge base)
- Distinctive: line 85
Check the file size — it should be 100-125 KB.
- Very specific: line 163
Always use --track-size to stay within the limit
- Distinctive: line 164
Don't read the completed document back into context — it's too large
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Expert Consultation Document Creator
Create comprehensive technical consultation documents by extracting code, diffs, and architectural context within LLM token limits (125KB).
Document Structure
Part 1: Problem Context (~15-25 KB)
- Problem — Issue, errors, test failures
- Our Solution — What was implemented and why
- Concerns — Code smells, coupling, architectural questions
- Alternatives — Other approaches, trade-offs
Part 2: Complete Architecture (~60-90 KB)
- Architecture Overview — ASCII diagram, data flow, patterns
- Components — Frontend, tests, controllers
- Services — Implementation and interfaces
- Models — Domain entities with relationships
Part 3: Expert Request (~5-10 KB)
- Questions — Specific technical questions
- Success Criteria — Requirements and priorities
Workflow
Step 1: Write Problem Context
Create a descriptive file like {topic}-consultation.md with the problem context, your solution, concerns, alternatives, and an architecture overview.
Step 2: Extract Code
Use the bundled extraction script with size tracking. The script accepts multiple files in one call — batch for efficiency.
node scripts/extract-code.js \
--track-size --output=doc.md \
--section="Core Files" \
file1.ts file2.ts file3.ts \
--section="Tests" \
test1.ts test2.tsFile format options:
- Full file:
src/Service.cs - Line ranges:
src/Service.cs:100-200orsrc/Service.cs:1-30,100-150 - Git diff (per-file):
src/Service.cs:difforsrc/Service.cs:diff=master..HEAD
Git diff options (all changes):
- Staged changes:
--staged - Commit changes:
--commit=abc123or--commit=HEAD~1
Branch-level options (PR consultations):
- All branch changes:
--branch-diff=master(auto-resolves merge base) - Full source of new files:
--new-files-from=master(syntax-highlighted, not diff format)
Prefer FULL files over chunks for better expert analysis. Use chunks only for very large files.
Step 3: Add Expert Request
Append an "Expert Guidance Request" section to the end of the document with:
- Questions — Numbered list of specific technical questions derived from the user's concerns
- Success Criteria — Bullet list of requirements and priorities
- "Please answer in English" — Always include as the final line
This section is critical — without it, the expert has no actionable request.
Step 4: Verify Size
Check the file size — it should be 100-125 KB. DO NOT read the full file back (exceeds context).
Code Extraction Examples
See EXAMPLES.md for detailed usage patterns.
With sections:
node scripts/extract-code.js \
--track-size --output=doc.md \
--section="What Changed" \
src/Service.cs:diff \
--section="Implementation" \
src/Service.cs src/Model.csUsing config file:
node scripts/extract-code.js \
--config=extraction-plan.jsonStaged or commit changes:
node scripts/extract-code.js \
--staged --track-size --output=doc.md
node scripts/extract-code.js \
--commit=abc123 --track-size --output=doc.mdPR consultation (single command for all branch changes):
node scripts/extract-code.js \
--branch-diff=master --track-size --output=consultation.md
# With full source of new files (syntax-highlighted, not diff format)
node scripts/extract-code.js \
--branch-diff=master --new-files-from=master \
--track-size --output=consultation.mdConfig File Format
{
"output": "consultation.md",
"trackSize": true,
"sections": [
{
"header": "What Changed",
"files": ["src/Service.cs:diff"]
},
{
"header": "Core Implementation",
"files": ["src/Service.cs", "src/Model.cs"]
}
]
}Code Inclusion Priority
Must include:
- Core interfaces/abstractions
- Modified/bug-fix code
- Domain models
- Key service methods
- Test examples
Skip if tight on space:
- Boilerplate
- Simple DTOs
- Repetitive test setups
Gotchas
- The 125KB limit is enforced by the extraction script — it warns at 100KB and 115KB, then exits at 125KB
- Always use
--track-sizeto stay within the limit - Don't read the completed document back into context — it's too large
- The script appends to existing files, so you can build incrementally
- Shell constructs like
$()and variable assignments in Bash calls can trigger permission prompts. Prefer simple, single-command calls when possible.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

