afc:principles

afc:principles is a skill for Claude Code from jhlee0409/all-for-claudecode. It costs 12 tokens per session (848 once invoked), scanned B, original, MIT.

A skill for managing a project's coding principles and conventions in a shared principles file. It can display, add, remove, or interactively initialize those principles.

In plain words
What is it for?
Setting up project principles, viewing the current rules, and updating them as the project changes.
Why use it?
It keeps important project rules available across coding sessions instead of leaving them scattered in conversations or documents.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the afc plugin — 29 skills, 12 agents, 19 hooks shipped together

Good fit Setting up project principles, viewing the current rules, and updating them as the project changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jhlee0409/all-for-claudecode/principles
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jhlee0409/all-for-claudecode --skill principles
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/all-for-claudecode

Made for: Claude Code.

Or install afc, the plugin that ships this one along with the rest of its 29 skills, 12 agents, 19 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for afc:principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/principles.svg)](https://agentmods.dev/skills/jhlee0409/all-for-claudecode/principles)
Your own site
<a href="https://agentmods.dev/skills/jhlee0409/all-for-claudecode/principles"><img src="https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/principles.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 848 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00848
Opus 5 $0.00006 $0.00424
Sonnet 5 $0.00002 $0.00170
Haiku 4.5 $0.00001 $0.00085

Measured 8d ago against content hash a19737e6820c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

afc:principles scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

!`cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND] .claude/afc.config.md not found. Create it with /afc:init."`
skills/principles/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/afc:principles — Manage Project Principles

Creates and manages the project's core principles (constitution). Stored in .claude/afc/memory/principles.md and referenced across all sessions.

Arguments

  • $ARGUMENTS — (optional) action directive:
    • not specified: view current principles
    • add {principle}: add a new principle
    • remove {number}: remove a principle
    • init: interactive initial setup

Project Config (auto-loaded)

!cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND] .claude/afc.config.md not found. Create it with /afc:init."

Execution Steps

1. Check Current State

Read .claude/afc/memory/principles.md:

  • If present: load existing principles
  • If absent: empty state (show init instructions)

2. Action Branch

A. View (no arguments)

Display current principles list:

Project Principles
├─ MUST-001: {principle}
├─ MUST-002: {principle}
├─ SHOULD-001: {principle}
└─ Last updated: {date}
B. Initial Setup (init)

Collect principles interactively:

  1. Analyze project context (CLAUDE.md, package.json, code structure)
  2. Suggest automatically extractable principles:
    • Comply with {config.architecture} rules
    • Follow {config.code_style}
    • Zero lint warnings (per {config.ci})
    • etc.
  3. Ask user for additional principles (AskUserQuestion)
  4. Structure collected principles
C. Add (add)
  1. Determine strength of the new principle (MUST / SHOULD / MAY)
  2. Add to principles.md
  3. Update version
D. Remove (remove)
  1. Confirm the principle
  2. Remove after user confirmation
  3. Update version (MAJOR)

3. Storage Format

# Project Principles

> Version: {MAJOR.MINOR.PATCH}
> Last Updated: {YYYY-MM-DD}

## MUST (non-negotiable)
- **MUST-001**: {principle} — {rationale}
- **MUST-002**: {principle} — {rationale}

## SHOULD (strongly recommended)
- **SHOULD-001**: {principle} — {rationale}

## MAY (optional)
- **MAY-001**: {principle} — {rationale}

## Changelog
- {date}: {change description}

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 108 lines · 12 tokens per session scan B a19737e6820c

Subscribe to this mod's changes

afc:principles is a skill published in the GitHub repository jhlee0409/all-for-claudecode (7 stars, last pushed 5mo ago), licensed MIT. It adds 12 tokens to every session and 848 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.