cf-init

cf-init is a skill for Claude Code, Codex from QBall-Inc/clear. It costs 58 tokens per session (3,548 once invoked), scanned A, original, Apache-2.0.

A setup tool for initializing the CLEAR framework, a system that organizes project context and agent workflows.

In plain words
What is it for?
It helps set up or reinitialize CLEAR and refresh its template files, including the project structure, session setup, hooks, status display, and instructions.
Why use it?
It creates the required project files and configuration so CLEAR can be used consistently in a project.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the clear plugin — 15 skills, 3 agents, 7 hooks shipped together

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.

agentmods
npx agentmods add skills/qball-inc/clear/cf-init
Any agent
npx skills add QBall-Inc/clear --skill cf-init
Clone the repo
git clone --depth 1 https://github.com/QBall-Inc/clear

Made for: Claude Code, Codex.

Or install clear, the plugin that ships this one along with the rest of its 15 skills, 3 agents, 7 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 cf-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/qball-inc/clear/cf-init.svg)](https://agentmods.dev/skills/qball-inc/clear/cf-init)
Your own site
<a href="https://agentmods.dev/skills/qball-inc/clear/cf-init"><img src="https://agentmods.dev/badge/skills/qball-inc/clear/cf-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,548 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00058 $0.03548
Opus 5 $0.00029 $0.01774
Sonnet 5 $0.00012 $0.00710
Haiku 4.5 $0.00006 $0.00355

Measured 3d ago against content hash 93ac4f226d3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cf-init scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cf-init/SKILL.md · 269 lines

How it starts

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

CLI Usage: When unsure about a CLI's interface or flags, run it with --help first. Do NOT attempt to discover functionality by reading plugin source code — doing so leads to incorrect execution from assumptions made without context of the holistic flow.

Initialize CLEAR Framework

Set up CLEAR (Context Layered Engineering for Agentic Resources) in the current project. This skill runs a single CLI command that creates the .clear/ directory structure, generates a project manifest, initializes Session 0, configures hooks, configures the statusline, and returns a structured JSON result. Claude then adds session resume instructions to CLAUDE.md.

Plugin Root Resolution

CLI commands in this skill reference $CLEAR_PLUGIN_ROOT — a .claude/settings.json env var the shell expands. The SessionStart hook persists it, but settings env vars load at session launch, so on a brand-new consumer's first session (before its next restart) the variable is empty and node "$CLEAR_PLUGIN_ROOT/build/..." fails with MODULE_NOT_FOUND. This matters most for /cf-init, which a consumer always runs before any restart.

First-session bootstrap — if $CLEAR_PLUGIN_ROOT is empty, set it inline in the same Bash call as the CLI (each Bash call is a fresh shell, so a separate export would not carry over):

export CLEAR_PLUGIN_ROOT="${CLEAR_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}"

Prepend it to the CLI in one shell line: export CLEAR_PLUGIN_ROOT="${CLEAR_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}"; <node "$CLEAR_PLUGIN_ROOT/build/..." command>. ${CLAUDE_PLUGIN_ROOT} resolves in this SKILL.md body to the actually-loaded plugin path; once the consumer restarts, $CLEAR_PLUGIN_ROOT is populated and the assignment is a harmless no-op.


When to Use This Skill

Trigger Pattern Example User Request Flag
First-time CLEAR setup "Initialize CLEAR in this project" (none)
Reinitialize from scratch (DESTRUCTIVE) "Reset CLEAR — start fresh", "Reinitialize CLEAR" --reinit-clean
Refresh meta files only (non-destructive) "Refresh my CLAUDE.md from the latest CLEAR template", "Update CLEAR rules.md" --refresh-config
Set up framework tracking "Set up CLEAR so my sessions are tracked" (none)

Read the full file on GitHub · 269 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. 3d ago First seen · 269 lines · 58 tokens per session scan A 93ac4f226d3d

Subscribe to this mod's changes

cf-init is a skill published in the GitHub repository QBall-Inc/clear (3 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 58 tokens to every session and 3,548 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

promote

Generate X/Twitter release promotion posts with ASCII tables and CodeSnap rendering. Use when writing release posts, promotion tweets, plugin announcements, or preparing social media content for new versions.

oliver-kriska/claude-elixir-phoenix · 39 tokens

release

CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.

oliver-kriska/claude-elixir-phoenix · 60 tokens

session-deep-dive

Deep qualitative analysis of high-signal sessions. Spawns subagents with v2 template, synthesizes patterns, compares against known findings. Use after /session-scan.

oliver-kriska/claude-elixir-phoenix · 40 tokens

catchup

Summarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.

oliver-kriska/claude-elixir-phoenix · 48 tokens

brainstorm

Brainstorm Elixir/Phoenix features — explore ideas, compare approaches, gather requirements. Use when vague idea, not sure how to approach, or want to discuss before plan.

oliver-kriska/claude-elixir-phoenix · 39 tokens

plugin-dev-workflow

Guide plugin development workflow — editing skills, agents, hooks, or eval framework in this repo. Use when modifying files in plugins/elixir-phoenix/, lab/eval/, or lab/autoresearch/. Ensures changes pass eval, lint, and tests before committing.

oliver-kriska/claude-elixir-phoenix · 59 tokens