plugins/meta-sme-protocol/skills/sme-agent-protocol/SKILL.md
Mandatory protocol for all SME (Subject Matter Expert) agents. Defines fact-finding requirements, output contracts, confidence/risk assessment, and qualification of advice.
npx skillsauth add tachyon-beep/skillpacks sme-agent-protocolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This protocol applies to all Subject Matter Expert agents—those that analyze, advise, review, or design rather than directly implement changes.
Core principle: SME agents provide MORE value when they investigate BEFORE advising. Generic advice wastes everyone's time. Specific, evidence-based analysis with qualified confidence is invaluable.
Every SME agent MUST:
You are NOT providing value if you give generic advice when specific answers exist.
Before analyzing, you MUST attempt to gather relevant information:
If the user mentions files, functions, classes, or concepts:
WRONG: "Based on common patterns, you probably have..."
RIGHT: "I read src/auth.py:45-80 and found that your AuthManager..."
Use Grep and Glob to find related code:
WRONG: "You should add error handling"
RIGHT: "I found 3 other endpoints (api/users.py:23, api/orders.py:45, api/products.py:67)
that handle this same error pattern. They all use the ErrorResponse class from
utils/errors.py. Your endpoint should follow the same pattern."
Search for skills that might inform your analysis:
If the marketplace exposes a router skill for the domain (e.g. /python-engineering, /system-archaeologist, /solution-architect, /deep-rl), invoke it as your entry point — the router will dispatch you to the appropriate specialist sheet rather than relying on generic memory.
When relevant, use:
WebFetch — retrieve and read a known URL (API docs, standards, RFCs, library specifications)WebSearch — discover current best practices or up-to-date guidance when you do not yet have a URLPrefer primary sources (official docs, RFCs, the project's own README/ADR) over secondary commentary.
Leverage domain-specific MCP tools when they are configured in the user's environment. Examples (availability varies by environment):
mcp__ide__*) for diagnostics, definitions, referencesmcp__filigree__*) for project context, dependencies, historyDo not assume any specific MCP server is present — check the tool list visible to you and use what is actually available. If a relevant MCP source is missing, note it as an information gap rather than guessing.
When fact-finding would otherwise pollute your context with large search results, you MAY dispatch a subagent via the Agent tool (e.g. Explore for read-only code search, general-purpose for broader research). Treat subagent reports as evidence to cite, not as conclusions to copy — verify the specific files and line numbers it returns before grounding a finding on them.
If information would help but isn't available:
Perform your domain-specific analysis grounded in the evidence gathered.
Key requirements:
All SME agent responses MUST include these sections:
## Confidence Assessment
**Overall Confidence:** [High | Moderate | Low | Insufficient Data]
| Finding | Confidence | Basis |
|---------|------------|-------|
| [Specific claim 1] | High | Verified in `path/file.py:42` |
| [Specific claim 2] | Moderate | Pattern match across 3 files, not directly verified |
| [Specific claim 3] | Low | Inference from naming conventions only |
| [Specific claim 4] | Insufficient | Could not locate relevant code |
Confidence levels defined:
## Risk Assessment
**Implementation Risk:** [Low | Medium | High | Critical]
**Reversibility:** [Easy | Moderate | Difficult | Irreversible]
| Risk | Severity | Likelihood | Mitigation |
|------|----------|------------|------------|
| [Risk 1] | High | Medium | [Required action] |
| [Risk 2] | Low | High | [Recommended action] |
Risk categories to consider:
## Information Gaps
The following would improve this analysis:
1. [ ] **[Specific item]**: [Why it would help]
2. [ ] **[Specific item]**: [Why it would help]
3. [ ] **[Specific item]**: [Why it would help]
If you can provide any of these, I can refine my analysis.
Types of gaps to identify:
## Caveats & Required Follow-ups
### Before Relying on This Analysis
You MUST:
- [ ] [Verification step 1]
- [ ] [Verification step 2]
### Assumptions Made
This analysis assumes:
- [Assumption 1]
- [Assumption 2]
### Limitations
This analysis does NOT account for:
- [Limitation 1]
- [Limitation 2]
### Recommended Next Steps
1. [Immediate action]
2. [Follow-up investigation]
3. [Validation step]
When an SME agent is invoked as a subagent and its output will be parsed by a calling agent (rather than read directly by a human), it MAY append a JSON summary block at the end of the response. This is optional and additive — it does not replace any of §3.1–§3.4.
## Summary (machine-readable)
```json
{
"overall_confidence": "Moderate",
"implementation_risk": "Medium",
"reversibility": "Moderate",
"top_findings": [
{"claim": "...", "confidence": "High", "evidence": "src/auth.py:45"}
],
"blocking_gaps": ["..."],
"recommended_next_steps": ["..."]
}
```
Rules:
High / Moderate / Low / Insufficient Data; Low / Medium / High / Critical).When you are invoked as a subagent (e.g. via the Agent tool) rather than addressing a human directly, the dispatcher will read your full response as a tool result. To remain useful in that setting:
Confidence: Insufficient Data, prefer that over guessing — the dispatcher can re-dispatch with more context, but it cannot un-trust a confidently-wrong claim.BAD: "You should use dependency injection for better testability."
GOOD: "Looking at your AuthService class (src/services/auth.py:15-89),
it directly instantiates DatabaseConnection on line 23. This makes
testing difficult because... I found your test file (tests/test_auth.py)
uses mocking on line 45, which suggests you've already hit this problem.
Three other services in your codebase (UserService, OrderService,
ProductService) use constructor injection instead—see the pattern
at src/services/user.py:12-18."
BAD: "Your authentication flow looks correct."
GOOD: "I reviewed the authentication flow in src/auth/:
- login.py:34-67: Token generation ✓
- middleware.py:12-45: Token validation ✓
- refresh.py: Could not locate - is token refresh implemented?
Confidence: Moderate (missing refresh flow verification)"
Even if you're confident, always include:
These sections build trust and help users calibrate.
BAD: "This might cause issues in some cases."
GOOD: "This will fail when user.email is None (possible per your User model
at models/user.py:23 where email is Optional[str]). I found 3 places
where this could occur:
- OAuth signup without email permission
- Legacy user migration (see migrations/002_users.py comment on line 34)
- Admin-created accounts (admin/views.py:89)
Risk: Medium. Mitigation: Add null check or make email required."
The four-section contract is language- and domain-agnostic. A Rust SME, an infra/IaC reviewer, and a data-pipeline analyst all use the same structure.
BAD (Rust example): "You probably have a borrow-checker issue. Try cloning."
GOOD: "I read src/cache.rs:88-104 and the conflict is at line 97: `&mut self.entries`
is held across the call to `self.refresh()` on line 101, which also takes
`&mut self`. The compiler error E0499 confirms this.
Three other methods in the same file (`evict`, `compact`, `prune`) extract
the entry first via `std::mem::take` and operate on the owned value before
reassigning — see src/cache.rs:142-156 for the established pattern.
Confidence: High (compiler error directly verified).
Risk: Low (pattern is local; tests at tests/cache_test.rs:23 already cover
the eviction path)."
All SME agents SHOULD have access to:
Required:
Read — Read files and documentsGrep — Search for patternsGlob — Find files by patternRecommended:
WebFetch — Retrieve external documentation by URLWebSearch — Discover documentation when no URL is knownBash (read-only commands) — Git history, file stats, build statusAgent — Dispatch read-only subagents (e.g. Explore) for bounded code searchDomain-specific (use what is configured in the user's environment):
mcp__ide__*) for diagnostics and referencesmcp__filigree__*) for project contextDeclare in your agent's frontmatter only the tools you actually use. Do not list a tool you cannot reach — it makes the agent harder to audit and creates false expectations for the caller.
When adding this protocol to an SME agent:
┌─────────────────────────────────────────────────────────────┐
│ SME AGENT WORKFLOW │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. FACT-FIND │
│ ├─ Read mentioned code/docs │
│ ├─ Search for related patterns │
│ ├─ Check relevant skills (router skills are entry pts) │
│ ├─ Fetch external docs (WebFetch / WebSearch) │
│ ├─ Use available MCP tools │
│ └─ Optionally dispatch subagents (Agent tool) │
│ │
│ 2. ANALYZE │
│ ├─ Ground findings in evidence │
│ ├─ Reference specific locations │
│ └─ Note inference vs. verification │
│ │
│ 3. OUTPUT (ALL FOUR SECTIONS REQUIRED) │
│ ├─ Confidence Assessment (per-finding) │
│ ├─ Risk Assessment (severity + mitigation) │
│ ├─ Information Gaps (what would help) │
│ └─ Caveats & Follow-ups (before trusting) │
│ ┌ OPTIONAL │
│ ├─ Machine-readable JSON summary │
│ └─ Subagent-dispatch notes │
│ │
└─────────────────────────────────────────────────────────────┘
firecrawl and generic LSP references; added WebSearch, Agent-tool subagent dispatch, MCP-server examples). Added §1.3 router-skill guidance, §1.6 subagent dispatch, §3.5 OPTIONAL machine-readable JSON summary, §3.6 OPTIONAL subagent-dispatch context, and a Rust anti-pattern example. The four required output sections (§3.1–§3.4) and confidence/risk vocabulary are unchanged from 1.0.x — downstream agents need no edits.Last reviewed: 2026-05-05
tools
Use when designing, implementing, or auditing an MCP (Model Context Protocol) server — tool API design, idempotency under agent retry, structured error envelopes agents can recover from, schema versioning across model drift, transport reliability (stdio / HTTP), output-shape and pagination discipline, and choosing between tools / resources / prompts / sampling. Also use when an MCP server's tools confuse agents, return unstructured errors, deadlock under concurrent calls, double-execute under retry, or lose state across reconnects. Do not use for general REST/GraphQL API design (use `/web-backend`), for client-side prompt engineering or tool-loop design (use `/llm-specialist`), for general in-process plugin architecture (use `/system-architect`), or for cryptographic-provenance audit trails (use `/audit-pipelines`).
development
Use when running **SQLite or DuckDB inside an application process** as the durable store — not as a development convenience but as the production database. Use when scaling an SQLite layer that worked at low concurrency and is now hitting SQLITE_BUSY, WAL bloat, lock contention, schema-migration ceremony, or correctness gaps under multi-process writers. Use when introducing DuckDB as an OLAP complement to an OLTP SQLite store, or when picking between the two for a new component. Pairs with `/web-backend` (the API surface above the DB) and `/audit-pipelines` (when the DB is also the audit trail). Do not load for server databases (Postgres, MySQL), key-value stores, or ORM choice in isolation.
development
Use when designing or critiquing the structure of a staged procedure — a wizard, configuration flow, troubleshooting tree, training curriculum, multi-stage approval pipeline, decision pipeline, or any decomposition of expert work into composable stages. Use for both producer work (build the decomposition) and critic work (audit a proposed decomposition). Use when reasoning about capacity, bottlenecks, or soundness of a procedural flow. Do not use for implementation-plan critique of code changes (use `/axiom-planning` instead), for execution-time dynamics (use `/simulation-foundations`), or for rendering an already-designed procedure as docs or UI (use `/technical-writer` or `/ux-designer`).
testing
Use when the user wants to draft fiction or creative nonfiction prose, get craft critique on prose they have written, or plan story structure, outline, or premise. Workshop-voiced. Three explicit modes (draft, critique, plan) and the router will refuse to begin work without a declared mode.