AGENT SKILL

using-runes

Use the runes memory tools (`rune_*`) to persist and recall durable knowledge about this project across sessions. Triggers: any time the user references past work, the agent makes a decision, the user corrects the agent, the agent learns a convention, or a new project rule is established. Use on-demand — do not auto-inject every turn. Use `rune_context` to recall, `rune_save` to record, `rune_search` to find by keyword. Do not save secrets, in-progress debug noise, or file content (read the file instead).

License 许可
CC-BY-4.0
最近更新
2026-07-29
Stars
★ 1
Forks
0

01 前言 Front Matter

name
using-runes
license
CC-BY-4.0
metadata
{ "version": "1.0.0" }
description
Use the runes memory tools (`rune_*`) to persist and recall durable knowledge about this project across sessions. Triggers: any time the user references past work, the agent makes a decision, the user corrects the agent, the agent learns a convention, or a new project rule is established. Use on-demand — do not auto-inject every turn. Use `rune_context` to recall, `rune_save` to record, `rune_search` to find by keyword. Do not save secrets, in-progress debug noise, or file content (read the file instead).

02 资源文件 1

03 SKILL.md 正文

using-runes

Always-on. The agent should consult and update the project's memory at well-defined moments. Memory is per-repo, scoped by git remote.origin.url (or path fallback), and persists across sessions.

Session start — read context

When a new task begins in a known project, call rune_context (no query) to load:

  • The 10 most recent memories (so the agent knows what has been decided/learned lately).
  • The active session (if any) — link new memories to it via session_id.

If the user references past work, the prior session's outcome, or a specific decision, call rune_context with a focused query (e.g., the keyword) to surface the relevant memories. Prefer rune_context(query=...) over rune_search for recall — it already orders by importance and excludes soft-deleted rows.

Subagents — don't duplicate memory

If you are an isolated subagent spawned for a single task (Rogue, Cleric, Paladin, Ranger, etc. under Guild fan-out), do not call rune_save unless the orchestrating agent explicitly asked you to. You cannot see what the parent agent or sibling subagents already saved this session — writing independently would create duplicate memories.

When to save

Save a memory with rune_save whenever one of the following happens and the knowledge would otherwise need to be re-explained next session:

  • decision — the user and the agent agree on a course of action ("let's use DDD", "we'll deploy via Kamal").
  • correction — the user corrects the agent's behavior ("no, we don't use any here", "this is a monorepo, don't cd into subdirs").
  • convention — a project convention becomes clear ("tests live next to the code", "use bun, not npm").
  • config value — a non-obvious config the agent should remember ("PORT defaults to 4096", "RUNES_DATA_DIR overrides the default").
  • naming — naming rules ("components are PascalCase, hooks are useFoo", "db tables are snake_case").
  • architecture — an architectural note that isn't obvious from the file tree ("the API gateway terminates mTLS, internal calls are plaintext").
  • constraint — a hard constraint ("Postgres is read-replica-only in this env", "no network calls in tests").
  • learning — a non-obvious lesson learned the hard way ("the apply.sh script must run from the repo root or it silently no-ops").

Each save needs a title (one line, ≤200 chars) and a what (the durable knowledge, ≤4000 chars). Use why for rationale, where_ref for the relevant file/dir, learned for corrections and lessons.

When NOT to save

  • Secrets — never save tokens, API keys, passwords, PII, or anything marked confidential. The skill is a soft guard; the README is the explicit warning.
  • One-off trivia — anything that won't matter next session.
  • In-progress debug noise — stack traces, scratch values, half-formed hypotheses. Save a learning only after the issue is resolved and the rule is clear.
  • File content — read the file with the host's tools. The memory is for meta about the project, not its source.
  • Easily re-derivable facts — package names, current versions of deps, public API shapes. Read the file.

Curation

rune_save automatically enforces a per-category cap (category_cap, default 10). When a category exceeds the cap, the response includes a compaction field with the overflow candidates. Two-step response:

  1. If the candidates are related — write one summary memory (rune_save) covering their combined knowledge, using a higher importance score, then rune_delete the originals.
  2. If the candidates are not related or not worth keeping — rune_delete them individually.

If you don't act in time, a hard cap (category_cap * 2) triggers automatic pruning — compaction.pruned_count > 0 means data was dropped uncurated. Recoverable via runes doctor --purge is the only path to hard-delete.

  • Importance 1–10. Default 5. Use 8–10 for hard rules, 3–4 for soft preferences, 1–2 for trivial facts.
  • Soft delete > hard delete. Always use rune_delete (soft). runes doctor --purge is the only path to hard-delete.

Categories — when to use which

Category One-line meaning
decisions "We chose X because Y" — architectural or process decisions.
corrections "Don't do X; do Y instead" — corrections of the agent's behavior.
project_rules Standing rules of the project that apply broadly.
architecture Structural / layering notes that aren't obvious from the file tree.
constraints Hard constraints the agent must respect (env, policy, perf budgets).
config_values Non-obvious config values and their effects.
naming Naming conventions and how to apply them.
learnings Lessons learned the hard way — apply to avoid repeating the mistake.

If unsure, prefer learnings over decisions — corrections are higher signal than choices.

Quick reference

rune_context({ query?: "auth" })            // recent + relevant, ordered by importance
rune_search({ query: "auth", category? })   // raw FTS5 search, ranked
rune_save({ category, title, what, ... })   // persist a new memory
rune_get({ id })                            // fetch one
rune_update({ id, ...fields })              // patch fields
rune_delete({ id })                         // soft delete
rune_session_start({ agent: "opencode" })   // begin a session (idempotent)
rune_session_end({ session_id, summary? })  // finish a session
rune_timeline({ limit? })                   // list recent sessions
rune_stats()                                // per-category counts

04 同仓库更多 Skills

runecraftai
runecraftai/arcanum

using-agent-skills

Discovers and invokes the right @runecraft/spells skill for the current task. Use when starting a session, when a request is ambiguous about which workflow to apply, or when you need to pick among the 13-skill Arcanum catalog. EN triggers: /skill, which skill, pick a skill, what skill should I use, skill discovery, meta skill. PT triggers: qual skill, qual habilidade, descobrir skill, qual fluxo usar. Do NOT use for: actual implementation work (route to the specific skill instead), unrelated standalone tasks outside the Arcanum catalog, or runtime-specific configuration (e.g., opencode.json / Claude Code plugin paths).

Skill与智能体开发
★ 1
runecraftai
runecraftai/arcanum

typescript-patterns

TypeScript best practices and patterns for type-safe, maintainable code. Covers discriminated unions, generics, const assertions, type narrowing, and common anti-patterns. Extends (does not override) project tsconfig. EN triggers: /typescript, TypeScript patterns, TS best practices, type safety, discriminated unions, generics, type narrowing. PT triggers: /typescript, padrões TypeScript, boas práticas TS, segurança de tipos, unions discriminadas, genéricos. Do NOT use for: JavaScript-only projects, runtime performance, or replacing project tsconfig rules.

★ 1
runecraftai
runecraftai/arcanum

test-driven-development

Drives development with tests — fail first, then make them pass, then refactor. Use when implementing any logic, fixing any bug, or changing any behavior. EN triggers: /test, write tests first, TDD, prove it, 80/15/5 pyramid, Beyonce Rule. PT triggers: /teste, testes primeiro, provar com teste, pirâmide 80/15/5. Do NOT use for: production incident triage (use /debug), or cosmetic-only changes with no behavioral surface.

代码审查测试与质量
★ 1
runecraftai
runecraftai/arcanum

spec-driven

Feature planning and implementation with 4 adaptive phases — Specify, Design, Tasks, Execute. Auto-sizes depth by complexity. Creates atomic tasks with verification criteria, atomic git commits, and requirement traceability. Features an independent Verifier (author != verifier, evidence-or-zero), persistent decision log (STATE.md), and test-coverage-matrix-driven tests, plus a self-improving lessons layer that turns verification failures into reusable project-local guidance. Stack-agnostic. Use when planning features (requirements, design, task breakdown), implementing with verification and atomic commits, or validating/verifying an implementation against a spec. Triggers (PT/EN): "specify feature", "vamos especificar", "discutir feature", "discutir este caso", "design", "design da feature", "tarefas", "quebrar em tarefas", "implementar", "build", "validar", "verify work", "UAT", "validar implementação", "record decision", "pause work", "pausar trabalho", "resume work", "retomar trabalho". Do NOT use for architecture decomposition analysis (use architecture skills) or technical design docs (treat as Complex scope: discuss gray areas + architecture-focused design).

★ 1
runecraftai
runecraftai/arcanum

skill-forge

Designs, authors, validates, and optimizes new Agent Skills from scratch. Use when creating a new skill, packaging a workflow as a skill, improving a skill's triggering accuracy, or evaluating whether a skill improves output quality. Covers the full lifecycle: DISCOVER, DESIGN, AUTHOR, VALIDATE, OPTIMIZE, DELIVER. Produces skills that follow the open SKILL.md format (YAML frontmatter + Markdown body, progressive disclosure, validation loops). EN triggers: /forge, create a skill, write a skill, build a skill, new skill, author a skill, package this as a skill, validate a skill, improve skill triggering, optimize skill description, evaluate skill quality. PT triggers: /forge, criar uma skill, escrever uma skill, construir uma skill, nova skill, empacotar como skill, validar skill, melhorar disparo, otimizar descrição de skill. Do NOT use for: discovering which existing skill to apply (use a dispatch/meta skill), planning feature implementation, or designing software architecture.

视觉设计Skill与智能体开发
★ 1
runecraftai
runecraftai/arcanum

shipping-and-launch

Prepares production launches with a pre-launch checklist, staged rollout, monitoring, and a rollback strategy — plus feature flag lifecycle (off → internal → beta → GA). Use when deploying a feature to production for the first time, releasing a significant change, or planning a rollout. EN triggers: /ship, pre-launch checklist, staged rollout, feature flag, rollback plan, monitoring. PT triggers: /shippar, checklist pré-lançamento, rollout gradual, feature flag, plano de rollback. Do NOT use for: pre-production development work, or one-off internal tools with no user exposure.

★ 1