home / skills / oimiragieo / agent-studio / skill-discovery

skill-discovery skill

/.claude/skills/skill-discovery

This skill helps you identify and invoke applicable skills before acting, ensuring correct technique and guidance is followed.

npx playbooks add skill oimiragieo/agent-studio --skill skill-discovery

Review the files below or copy the command above to add this skill to your agents.

Files (11)
SKILL.md
4.6 KB
---
name: skill-discovery
description: How agents discover and use skills. Use to understand skill invocation protocol.
version: 1.0
model: haiku
invoked_by: agent
user_invocable: false
tools: [Read, Glob, Grep]
best_practices:
  - Check for relevant skills BEFORE any response
  - Process skills first (brainstorming, debugging)
  - Personal skills override framework skills
error_handling: graceful
streaming: supported
---

<EXTREMELY-IMPORTANT>
If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.

IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.

This is not negotiable. This is not optional. You cannot rationalize your way out of this.
</EXTREMELY-IMPORTANT>

## How to Access Skills

**In Claude Code:** Use the `Skill` tool or read skill files directly. When you invoke a skill, its content is loaded and presented to you - follow it directly.

**In other environments:** Check your platform's documentation for how skills are loaded.

# Using Framework Skills

## The Rule

**Invoke relevant or requested skills BEFORE any response or action.** Even a 1% chance a skill might apply means that you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you don't need to use it.

```dot
digraph skill_flow {
    "User message received" [shape=doublecircle];
    "Might any skill apply?" [shape=diamond];
    "Invoke Skill tool" [shape=box];
    "Announce: 'Using [skill] to [purpose]'" [shape=box];
    "Has checklist?" [shape=diamond];
    "Create TodoWrite todo per item" [shape=box];
    "Follow skill exactly" [shape=box];
    "Respond (including clarifications)" [shape=doublecircle];

    "User message received" -> "Might any skill apply?";
    "Might any skill apply?" -> "Invoke Skill tool" [label="yes, even 1%"];
    "Might any skill apply?" -> "Respond (including clarifications)" [label="definitely not"];
    "Invoke Skill tool" -> "Announce: 'Using [skill] to [purpose]'";
    "Announce: 'Using [skill] to [purpose]'" -> "Has checklist?";
    "Has checklist?" -> "Create TodoWrite todo per item" [label="yes"];
    "Has checklist?" -> "Follow skill exactly" [label="no"];
    "Create TodoWrite todo per item" -> "Follow skill exactly";
}
```

## Red Flags

These thoughts mean STOP - you're rationalizing:

| Thought                             | Reality                                                |
| ----------------------------------- | ------------------------------------------------------ |
| "This is just a simple question"    | Questions are tasks. Check for skills.                 |
| "I need more context first"         | Skill check comes BEFORE clarifying questions.         |
| "Let me explore the codebase first" | Skills tell you HOW to explore. Check first.           |
| "I can check git/files quickly"     | Files lack conversation context. Check for skills.     |
| "Let me gather information first"   | Skills tell you HOW to gather information.             |
| "This doesn't need a formal skill"  | If a skill exists, use it.                             |
| "I remember this skill"             | Skills evolve. Read current version.                   |
| "This doesn't count as a task"      | Action = task. Check for skills.                       |
| "The skill is overkill"             | Simple things become complex. Use it.                  |
| "I'll just do this one thing first" | Check BEFORE doing anything.                           |
| "This feels productive"             | Undisciplined action wastes time. Skills prevent this. |
| "I know what that means"            | Knowing the concept != using the skill. Invoke it.     |

## Skill Priority

When multiple skills could apply, use this order:

1. **Process skills first** (brainstorming, debugging) - these determine HOW to approach the task
2. **Implementation skills second** (frontend-design, mcp-builder) - these guide execution

"Let's build X" -> brainstorming first, then implementation skills.
"Fix this bug" -> debugging first, then domain-specific skills.

## Skill Types

**Rigid** (TDD, debugging): Follow exactly. Don't adapt away discipline.

**Flexible** (patterns): Adapt principles to context.

The skill itself tells you which.

## User Instructions

Instructions say WHAT, not HOW. "Add X" or "Fix Y" doesn't mean skip workflows.

## Memory Protocol (MANDATORY)

**Before starting:**
Read `.claude/context/memory/learnings.md`

**After completing:**

- New pattern -> `.claude/context/memory/learnings.md`
- Issue found -> `.claude/context/memory/issues.md`
- Decision made -> `.claude/context/memory/decisions.md`

> ASSUME INTERRUPTION: If it's not in memory, it didn't happen.

Overview

This skill explains how agents discover and invoke other skills and prescribes a strict protocol for checking and using skills before taking action. It enforces an explicit “invoke-if-any-chance-applies” rule and defines priorities, red flags, and post-task memory steps. The goal is consistent, auditable behavior when multiple skills or processes might be relevant.

How this skill works

The skill requires an immediate skill check when a user message arrives: if there is even a small chance a skill applies, invoke the Skill tool. Once invoked, announce which skill is being used and follow its instructions exactly. When a skill includes a checklist, convert each item into a TodoWrite todo and complete them in order. Apply the defined priority order when multiple skills could apply.

When to use it

  • At the start of any user request or task evaluation
  • When you think a skill might possibly apply (>=1% chance)
  • Before asking clarifying questions or exploring files
  • When multiple skills could influence approach or execution
  • Whenever process discipline, debugging, or implementation guidance is needed

Best practices

  • Always perform a skill check before any action or clarification.
  • If a skill is invoked and later proves irrelevant, stop using it but note the invocation.
  • Follow rigid skills exactly; treat flexible skills as adaptable principles.
  • When multiple skills apply, apply process-type skills before implementation-type skills.
  • Record learnings, issues, and decisions to the designated memory files after finishing.

Example use cases

  • Receiving a vague request — run a skill check, then use a brainstorming or clarification skill if applicable.
  • Fixing a bug — invoke a debugging skill first, then domain-specific implementation skills.
  • Starting a build — run process skills (planning, TDD) before implementation skills (frontend, backend).
  • Conducting a code review — check for a review or linting skill, convert its checklist to todos, then follow through.

FAQ

What if invoking a skill slows down the workflow?

Invoke anyway. The protocol mandates checking first; if the skill is irrelevant you can stop using it. The small time cost prevents bigger missteps.

How do I choose between conflicting skills?

Use the priority order: process skills first, then implementation skills. If still unclear, invoke both and follow the skill guidance that applies to the current phase.