.agents/skills/analyze/SKILL.md
Multi-angle analysis of existing artifacts, codebases, documents, or systems. Examines what you have from six analysis angles and produces structured findings with prioritized recommendations.
npx skillsauth add tkstang/open-agent-toolkit analyzeInstall 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.
Multi-angle analysis of existing artifacts, codebases, documents, or systems. Where /deep-research is external-facing ("go find out about X"), /analyze is internal-facing ("look deeply at this thing I have"). The input is something concrete -- a file, directory, codebase, document, presentation, or idea. Examines the target from six analysis angles and produces structured findings with prioritized recommendations.
Use when:
Don't use when:
Parse from $ARGUMENTS:
Print this banner once at start:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/analyze
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Then print step indicators before beginning work:
[1/9] Parsing arguments…[2/9] Reading context… (if applicable)[3/9] Classifying input type…[4/9] Selecting analysis angles…[5/9] Checking sub-agent availability…[6/9] Executing analysis angles…[7/9] Checking for comparisons… (if applicable)[8/9] Cross-angle synthesis…[9/9] Writing artifact…For long-running operations, print a start line and a completion line:
→ Analyzing: {angle}…
→ Complete.
Keep it concise; don't print a line for every shell command.
[1/9] Parsing arguments…
Parse from $ARGUMENTS:
If target is unclear, ask for clarification:
AskUserQuestionThe prompt should ask: "What would you like me to analyze? Provide a file path, directory path, or describe the idea in quotes."
[2/9] Reading context…
If --context is specified:
.md files as evaluation criteria--context separates "what to analyze" (target) from "what to analyze it against" (context). Example: /analyze src/auth/ --context docs/security-policy.md analyzes auth code against the security policy.
If --context is not specified, skip this step.
[3/9] Classifying input type…
Classify the target to determine analysis angle emphasis:
| Input Type | Detection |
| ------------------------- | -------------------------------------------------------------- |
| Code / codebase | File/directory containing .ts, .js, .py, etc. |
| Architecture / design doc | Markdown files with architecture/design content |
| Product spec / PRD | Documents with requirements, user stories, acceptance criteria |
| Presentation / deck | Slide-like content, structured for audience delivery |
| Strategy / proposal | Business-oriented documents with proposals or strategies |
| Idea (unstructured) | Quoted text, no file path, conceptual description |
Log: → Input type: {type}
[4/9] Selecting analysis angles…
All six angles are ALWAYS run. The input type determines emphasis weighting (primary angles get deeper investigation):
| Input Type | Primary Emphasis | Secondary Emphasis | | ------------------------- | --------------------------------- | ------------------ | | Code / codebase | Adversarial, Gap, Structural | Consistency | | Architecture / design doc | Adversarial, Gap, Structural | Opportunity | | Product spec / PRD | Gap, Opportunity, Audience | Consistency | | Presentation / deck | Audience, Structural, Consistency | Opportunity | | Strategy / proposal | Adversarial, Opportunity, Gap | Audience | | Idea (unstructured) | Opportunity, Adversarial, Gap | Audience |
The six analysis angles:
| Angle | What It Asks | | --------------------------- | -------------------------------------------------------------------------------------- | | Adversarial / Critical | What could go wrong? Where are the weaknesses? What assumptions are fragile? | | Gap Analysis | What's missing? What was promised but not delivered? What's implicit but unstated? | | Opportunity Analysis | What could be improved? What potential is untapped? What adjacent possibilities exist? | | Structural / Organizational | Is this well-organized? Does the structure serve its purpose? Are boundaries clean? | | Consistency / Coherence | Do the parts agree with each other? Are there internal contradictions? | | Audience / Clarity | Will the intended audience understand this? Is the signal-to-noise ratio good? |
Log the selected emphasis: → Primary: {angles} · Secondary: {angles}
[5/9] Checking sub-agent availability…
→ analysis workers: {available | not resolved} ({reason})
→ Selected: Execution Tier {1|2|3} — {description}
Execution Tier 1 -- Parallel worker dispatch (preferred):
Agent tool calls, each with subagent_type: "general-purpose" and a structured analysis prompt for one angle. Each worker receives: target content (or pointers to files), angle description, any --context criteria, and output format instructions.multi_agent = trueExecution Tier 2 -- Sequential self-execution:
→ analysis workers: not resolved — falling back to Execution Tier 2 (sequential)Execution Tier 3 -- Inline execution:
[6/9] Executing analysis angles…
For each angle, the worker (sub-agent or self) receives:
Each worker returns structured findings inline to orchestrator.
Print progress for each angle:
→ Analyzing: Adversarial / Critical…
→ Complete.
→ Analyzing: Gap Analysis…
→ Complete.
[7/9] Checking for comparisons…
If any angle surfaces comparables (e.g. "this component could use library A or B"):
If no comparables surfaced, skip this step.
[8/10] Cross-angle synthesis…
[9/10] Resolving output destination…
If an explicit output path was provided in $ARGUMENTS, use it directly — no prompt.
Otherwise, determine a default suggestion using OAT-aware detection:
.oat/ at repo root (project-level OAT) → suggest .oat/repo/analysis/~/.oat/ (user-level OAT) → suggest ~/.oat/analysis/Then ask the user via AskUserQuestion (Claude Code), structured user-input tooling (Codex), or equivalent:
"Where would you like to write the analysis? (default: {suggested path})"
[10/10] Writing artifact…
Write the structured analysis artifact using:
../deep-research/references/schema-base.md../deep-research/references/schema-analysis.mdArtifact frontmatter contract:
---
skill: analyze
schema: analysis
topic: '{descriptive topic from target}'
model: { self-detected model identifier }
generated_at: { today's date }
input_type: { classified input type }
---
Plus optional: context (if --context was provided)
Model-tagged filename: {topic-slug}-analysis-{model-id}.md
Output is always an artifact file -- never inline-only.
/analyze src/auth/
/analyze src/auth/ --context docs/security-policy.md
/analyze docs/spec.md
/analyze "We should migrate from REST to GraphQL for our public API"
/analyze docs/architecture.md --context docs/requirements.md
Target path doesn't exist:
AskUserQuestion (Claude Code), structured user-input tooling (Codex), or plain text (fallback)Target is too large:
Input type unclear:
Sub-agent dispatch fails:
→ analysis workers: not resolved (dispatch failed) — falling back to Execution Tier 2--context file not found:
documentation
Use when OAT implementation changes and repository reference docs must be synchronized. Updates .oat/repo/reference to match current behavior.
business
Merge multiple analysis artifacts into a single coherent report with provenance tracking. Reads existing artifacts from /deep-research, /analyze, and /compare.
testing
Use when the user questions or suspects an agent claim is wrong. Adversarially gathers evidence to verify or refute the claim using the best sources available in the current environment.
tools
Use when prioritizing backlog work or evaluating a roadmap. Produces value-effort ratings, dependency mapping, and execution recommendations.