Skip to content
Back to skills

Modes

ASecurity

Scaffolds advanced stateful skills with filesystem-native state schemas, lifecycle state machines, and deterministic skill chaining in the main conversation context.

  • 8 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 9, 2026
ai-agentspythonbash

Works with

  • cli

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add richfrem/agent-plugins-skills --skill modes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Modes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Modes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-modes-10382ddf/badge)](https://www.skillsdirectory.com/skills/richfrem-modes-10382ddf)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Create Stateful Skill (`create-stateful-skill`)

Scaffolds advanced stateful skills with filesystem-native state schemas, lifecycle state machines, and deterministic skill chaining in the main conversation context.

## Contents

- [Critical Constraints](#critical-constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Verification](#verification)
- [References](#references)

## Critical Constraints

1. **Stateful Skill vs Sub-Agent Boundary**: Stateful skills run directly in the main conversation using filesystem schemas (`.agent/state/` or artifact frontmatter). Multi-turn and interactive wizards are stateful skills (use `authoring-subagents` only for isolated, sandboxed or adversarial roles); stateless procedures use `create-skill`.
2. **Deterministic Chaining**: Skill transitions must offer explicit next-step capabilities (`/skill-name`), not loose commands.
3. **Budget Compliance**: Generated skill instructions must stay within the lean advisory limit ($\le 80$ lines).

## Quick start

Scaffold a new stateful skill directory using the generator helper:

```bash
python3 scripts/scaffold.py --name <skill-name> --type stateful --path plugins/<plugin>/.apm/skills
```

## Workflow

1. **Pre-Scaffold Qualification**: Verify that the skill requires persistent state schemas or lifecycle transitions across turns.
2. **Select L4 Patterns**: Consult `pattern-decision-matrix.md` to select artifact lifecycle, state propagation, or escalation models.
3. **Design State Schema**: Formulate JSON/YAML schemas for `context/` or structured frontmatter.
4. **Scaffold Directory**: Generate `SKILL.md`, `evals/evals.json`, and reference files.
5. **Chain Next Steps**: Configure standard next-step blocks linking downstream capabilities.

## Verification

Audit the newly created skill for contract compliance and schema validity:

```bash
python3 scripts/audit_skill.py plugins/<plugin>/.apm/skills/<skill-name> --mode source
```

## References

- [pattern-decision-matrix.md](../pattern-decision-matrix.md) — Decision matrix for L4 stateful skill patterns.
- [persistent-plugin-configuration.md](../patterns/persistent-plugin-configuration.md) — Persistent configuration pattern reference.
- [cyclical-state-propagation-contract.md](../patterns/cyclical-state-propagation-contract.md) — Cyclical state propagation pattern reference.
- [hitl-interaction-design.md](../hitl-interaction-design.md) — Human-in-the-loop interaction guidelines and confirmation gates.
- [acceptance-criteria.md](../acceptance-criteria.md) — Acceptance gates and structural requirements for stateful skills.
- [fallback-tree.md](../fallback-tree.md) — Fallback resolution when state schemas or chaining fail.

Files in this skill

  • audit-skill.md2.8 KB
  • create-azure-agent.md1.9 KB
  • create-docker-skill.md2.3 KB
  • create-mcp-integration.md2.3 KB
  • create-skill.md3.2 KB
  • create-stateful-skill.md2.7 KB
  • ecosystem-authoritative-sources.md2.2 KB
  • ecosystem-standards.md2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.