Consult spec

From blockscout/mcp-server · View interactive version

Consult spec is an AI agent skill from the GitHub repository blockscout/mcp-server. TRIGGER CONDITIONS - invoke this skill when ANY of these apply: User-triggered (explicit request): - User mentions "specification", "SPEC", "SPEC.md", "spec requirements" - User asks to "verify with spec", "confirm with specification", "check requirements" - User requests "authoritative requirements

How to use this skill

Skill file

SPEC.md Consultation Skill

Before implementing any feature or making architectural decisions, consult SPEC.md through an isolated Explore agent to understand the authoritative requirements and design principles.

Purpose

This skill provides access to SPEC.md (the source of truth for architecture and requirements) through a dedicated subagent that ONLY reads the specification, never the implementation code. This ensures you receive unbiased, authoritative guidance based on requirements rather than potentially incorrect implementations.

When to Use This Skill

Use this proactively when you:

Do NOT use this when:

Workflow

1. Formulate Your Question

Be specific about what you need from the spec:

Good questions:

Bad questions:

2. Spawn the Spec Consultant Subagent

Use the Task tool to create an Explore agent with a minimal prompt that directs it to read its detailed instructions:

Task tool parameters:
- subagent_type: "Explore"
- description: "Consult SPEC.md about <specific topic>"
- prompt: "Read your detailed instructions from .claude/skills/consult-spec/agent-instructions.md,
          then answer this question: <your specific question>"

This keeps the main agent context clean while giving the subagent full access to its operating constraints and workflow.

3. Resume for Follow-Up Questions

If you need multiple spec queries during the same implementation task:

4. Use the Answer in Your Work

The subagent will return:

Use this authoritative guidance to implement features correctly according to the specification.

Example Usage

Scenario: Main agent is implementing a new feature that requires understanding spec requirements

Main agent thinks: "I need to understand the spec requirements before implementing this."

Main agent invokes Task tool:

subagent_type: "Explore"
description: "Consult SPEC.md about [topic]"
prompt: "Read your detailed instructions from .claude/skills/consult-spec/agent-instructions.md,
        then answer this question: [Your specific question about requirements, architecture, or design principles]"

Subagent responds (abstract pattern):

The [requested concept/requirement] is defined in lines XXX-YYY of SPEC.md.

Key requirements:
- [First key principle or requirement from the spec]
- [Second key principle or requirement from the spec]
- [Third key principle or requirement from the spec]

Direct quote (lines XXX-YYY):
"[Relevant quote from the specification that clarifies the requirement]"

The [data structure/model/pattern] should contain:
- [component_name]: [description of requirement]
- [component_name]: [description of requirement]

Additional context in lines XXX-YYY explains [related concept].

Main agent uses this: Implements the feature correctly according to spec requirements

Important Notes

Subagent Scope Constraint

The Explore subagent is instructed to ONLY read SPEC.md. This is enforced through:

If the subagent attempts to read other files, strengthen the prompt wording or report the issue.

Why This Matters

SPEC.md is the authoritative source of truth. Implementation code may contain:

By consulting SPEC.md through an isolated subagent, you ensure your implementation decisions are based on requirements, not on potentially incorrect existing code.

When to Read Code Directly

You still need to read implementation code when you're:

Use SPEC.md consultation for "what should this do?" and code reading for "how is this currently done?"

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.