Skill authoring

From Vrooli/Vrooli · View interactive version

Skill authoring is an AI agent skill from the GitHub repository Vrooli/Vrooli. Guide for creating and updating skills that steer AI agents effectively. Skills are principle-based guidance documents that help agents make good decisions without dictating exact steps.

How to use this skill

Skill file

Steer focus: Skill Authoring

Guide for creating and updating skills that steer AI agents effectively. Skills are principle-based guidance documents that help agents make good decisions without dictating exact steps.

Required reading:


**1. The Shared Mental Model Problem**

Skills exist to solve a fundamental problem: multiple agents across different sessions need to conceptualize problems the same way.

Without shared mental models, each agent (or even the same agent across sessions) makes different architectural decisions, leading to divergent implementations, duplication, and inconsistency. Generic advice like "keep code DRY" doesn't prevent this - agents need concrete patterns they can consistently apply.

The goal of every skill: Create a mental model so clear that any agent, in any session, would make the same structural decisions when facing similar problems.


**2. Convergence Patterns**

The most effective skills provide visual patterns that agents can reference consistently. When something can be described as a decision tree, diagram, or table, agents gravitate toward it across sessions.

**Decision Trees**

For multi-step decisions, provide a visual flow:

                    Is this used in 2+ places?
                              │
              ┌───────────────┴───────────────┐
            YES                               NO
              │                                │
              ▼                                ▼
     Extract to shared/              Is this conceptually
     immediately                     reusable?
                                           │
                               ┌───────────┴───────────┐
                             YES                       NO
                               │                        │
                               ▼                        ▼
                       Design for reuse          Keep local
**Decision Tables**

For classification decisions, use YES/NO tables:

| Question | If YES | If NO |

|----------|--------|-------|

| Is it used by 2+ components? | Zustand store | Continue... |

| Will it persist across navigation? | Zustand store | Continue... |

| Is it purely ephemeral UI? | Local useState | Zustand store |

**Architecture Diagrams**

For layered systems, show the flow:

Components (consume state, never define shared state)
    ↓
Hooks (React state management, UI logic)
    ↓
Controllers (orchestration, business logic)
    ↓
Services (API calls, validation)

Why these work: Visual patterns are unambiguous. Prose like "consider whether the state is shared" leaves room for interpretation. A decision table with explicit criteria does not.


**3. Principles Over Prescriptions**

While convergence patterns provide structure, skills should still guide thinking, not dictate steps.

Good guidance:

Bad guidance:

The goal is to teach what to care about, not what to do. Agents should be able to apply the principles to novel situations - but with enough concrete patterns that they arrive at consistent solutions.


**4. Clear Intent Statement**

Every skill opens with a clear statement of purpose:

## Steer focus: [Skill Name]

[1-2 sentence summary of what this skill steers toward]

The summary should answer: "If I only read this sentence, what would I prioritize?"

Examples:

**4.1 Steer Skills Must Target a Specific Scenario**

Steer skills are always focused on a single scenario via the {{TARGET}} placeholder. This is a hard requirement for all steer-mode skills.

The {{TARGET}} placeholder gets substituted with the actual scenario name when the skill is applied. This ensures:

Where to use {{TARGET}}:

Example opening for a steer skill:

## Steer focus: API Hardening

Prioritize **hardening API boundaries** in `scenarios/{{TARGET}}/api/` with proper validation, error handling, and type-safe contracts.

Your goal is to ensure the target scenario's API **fails gracefully** and provides clear error messages, rather than crashing or leaking internal details.

**5. Boundary Definition**

Every skill must explicitly define what's IN scope and OUT of scope. This prevents conflicts between skills and keeps agents focused.

What's IN scope:

What's OUT of scope:

Note: Session-level constraints (do not add features, preserve behavior, etc.) are now handled by scope skills rather than inline constraint sections. Skills with defaultScope in their metadata will automatically include the appropriate scope when loaded with --with-scope.


**6. Skill Structure**

Skills follow a consistent structure that makes them scannable and predictable:

  1. Focus statement - What this skill steers toward
  2. Tooling prerequisites - Required setup (optional)
  3. Core principles - Numbered sections with convergence patterns where applicable
  4. Audit section - Assessment checklist for existing codebases (optional, see below)
  5. Memory management - Comment/documentation guidelines and integration with memory-related tools (e.g. visited-tracker, knowledge-observatory)
  6. Output expectations - What can/must be changed

Note: Session-level constraints are handled by scope skills (e.g., refactor-scope, feature-scope) rather than inline sections. Set defaultScope in skill metadata when appropriate.

The exact number of principle sections varies, but the structure should feel consistent.

**When to Include an Audit Section**

Some skills need to assess existing codebases at any maturity level before prescribing changes. For these, include an audit section with:

Example audit pattern:

### **Coherence Audit**

#### Step 1: State Inventory

rg "useState\(" --type tsx -c | sort -t: -k2 -nr | head -20


**Red flags:**
- [ ] Files with 10+ useState calls → candidate for consolidation
- [ ] Similar state shapes in multiple components → missing shared abstraction

Audit sections make skills applicable to brownfield projects, not just greenfield development.


**7. Anti-Gaming Measures**

Skills should distinguish between "real improvements" and "superficial changes" to prevent metric-gaming:

Examples of anti-gaming guidance:

If a skill can be gamed by making shallow changes, add explicit guidance about what "real" progress looks like.


**8. Agent Memory Loop**

Agent sessions are stateless - when a session ends, all context is lost. For skills that involve investigation, audit, or systematic work, agents must explicitly read and write documentation to maintain continuity across sessions.

The Memory Loop Pattern
┌─────────────────────────────────────────────┐
│           AGENT MEMORY LOOP                 │
├─────────────────────────────────────────────┤
│                                             │
│  START SESSION                              │
│       │                                     │
│       ▼                                     │
│  READ existing findings docs                │
│  (understand what prior agents discovered)  │
│       │                                     │
│       ▼                                     │
│  DO the skill's work                        │
│  (informed by prior findings)               │
│       │                                     │
│       ▼                                     │
│  WRITE updated findings                     │
│  (so next agent can continue)               │
│       │                                     │
│       ▼                                     │
│  END SESSION                                │
│                                             │
└─────────────────────────────────────────────┘

Without READ: Agent duplicates or overwrites prior work

Without WRITE: Discoveries are lost when session ends

Specifying Documentation Patterns

Skills that involve investigation should specify:

  1. What to read at session start
  2. What to write at session end
  3. Document template for consistent structure

The specific documents depend on what makes sense for the skill's purpose. A skill might:

Conventional location: docs/internal/ for agent-produced findings (not user-facing docs)

Example: Skill with Documentation Pattern
### **Documentation**

**At session start**, read existing findings:
- `docs/internal/MY_FINDINGS.md` - prior audit results

**At session end**, update findings:

Update `docs/internal/MY_FINDINGS.md` to reflect your findings:
* The code is the source of truth. Verify existing claims before extending.
* If the file exists, correct inaccuracies and add new findings.
* Create the `docs/internal/` directory if needed.

**Template:**

[Skill Name] Findings

Last Updated

[Date]

Summary

[Current state overview]

Findings

Priority Actions

  1. [Most important next step]
Relationship to visited-tracker

The memory loop has two complementary parts:

| Tool | Tracks | Purpose |

|------|--------|---------|

| visited-tracker | Which files have been analyzed | Prevents re-investigating same files |

| Findings docs | What was discovered | Preserves knowledge for future sessions |

Use both together for skills involving systematic codebase work.

Follow prompt-manager skills read visited-tracker-tools for full usage, per-file notes, and globbing.

visited-tracker commands:

# At session start: find files not yet analyzed
visited-tracker least-visited --location scenarios/{{TARGET}} --tag [skill-tag] --limit 5

# After analyzing a file: mark as visited
visited-tracker visit <file-path> --location scenarios/{{TARGET}} --tag [skill-tag] --note "<summary>"

**9. Protective Comments**

When skills include configuration blocks (tsconfig, eslint, etc.), wrap them in protective comments that explain:

Example:

{
  "compilerOptions": {
    // ╔════════════════════════════════════════════════════════════════╗
    // ║  SAFETY-CRITICAL RULES - DO NOT REMOVE OR WEAKEN              ║
    // ║  These rules prevent runtime crashes. If you encounter errors:║
    // ║  ✅ DO: Fix with optional chaining (?.) or null checks        ║
    // ║  ❌ DON'T: Remove the rules or use @ts-ignore                 ║
    // ╚════════════════════════════════════════════════════════════════╝
    "strict": true
  }
}

Future agents need to understand why rules exist before they can safely modify them.


**10. Registration**

To publish a skill:

  1. Create the markdown file in scenarios/prompt-manager/skills/core/ (or drafts/ for WIP)
  2. Add metadata entry in metadata.json:
{
  "id": "my-skill",
  "file": "my-skill.md",
  "name": "My Skill",
  "description": "Brief description of what this skill steers toward",
  "modes": ["Steer", "CategoryMode"],
  "tags": ["skill"],
  "icon": "LucideIconName",
  "targetToolId": null,
  "draft": false,
  "createdAt": "YYYY-MM-DDTHH:MM:SSZ",
  "updatedAt": "YYYY-MM-DDTHH:MM:SSZ"
}
  1. Test loading - Verify the skill appears correctly in prompt-manager UI

**11. Maintain Skill System Constraints**


**12. Output Expectations**

You may update:

You must:

Avoid:

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.