ruleforge CLAUDE.md

Project instructions for RuleForge, a Python command-line tool that reads coding-agent session logs and creates optimized rules files. It also records how effective those rules are.

In plain words
What is it for?
Use them when building, testing, linting, type-checking, or extending RuleForge and its log-processing, rule-generation, tracking, or hook components.
Why use it?
They explain the project’s required structure, coding conventions, development commands, and restrictions so changes remain compatible.

Instructions file

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 instructions/cololi/ruleforge/claude-md
Clone the repo
git clone --depth 1 https://github.com/cololi/ruleforge
Per session 352 This file is loaded in full into every session.
When invoked 352 The same file — it is already loaded in full.
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.00352 $0.00352
Opus 5 $0.00176 $0.00176
Sonnet 5 $0.00070 $0.00070
Haiku 4.5 $0.00035 $0.00035

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

Security

Grade A, and why

ruleforge CLAUDE.md 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 2d 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.

CLAUDE.md · 39 lines

What it actually says

RuleForge

CLI tool that reads Claude Code / Codex session logs and generates optimized rules files.

Tech Stack

  • Python 3.12+, uv for package management
  • Typer (CLI), Rich (terminal UI), Pydantic (config + models)
  • anthropic SDK for LLM classification
  • SQLite for effectiveness tracking

Commands

  • Build: uv build
  • Test: uv run pytest
  • Lint: uv run ruff check src/ tests/
  • Type check: uv run mypy src/
  • Install dev: uv sync --dev

Code Style

  • Use functional style, avoid classes unless modeling state (Tracker, Config)
  • Use from __future__ import annotations in every file
  • Prefer pathlib.Path over os.path
  • Use Pydantic BaseModel for all data structures
  • Async functions for any LLM API calls
  • Type all function signatures strictly

Architecture

  • parsers/ — Read JSONL session logs into Session models
  • extractors/ — Heuristic + LLM pattern extraction pipeline
  • generators/ — Render patterns into CLAUDE.md / rules files
  • tracker/ — SQLite-backed effectiveness measurement
  • hooks/ — Claude Code hook installer
  • models/ — Pydantic domain models (Session, Pattern, Rule)

Prohibitions

  • NEVER use print() for user output — use Rich console
  • NEVER hardcode API keys or model names — use config
  • Do not add dependencies without updating pyproject.toml
  • Do not write tests that require live API calls — mock LLM responses
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. 2d ago First seen · 39 lines · 352 tokens per session scan A ee33e2e1be11

Subscribe to this mod's changes

ruleforge CLAUDE.md is an instructions file published in the GitHub repository cololi/ruleforge (2 stars, last pushed 4mo ago), licensed MIT. It adds 352 tokens to every session, about $0.0018 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 instructions, from other repositories

ashfox AGENTS.md

Instructions for sigee-min/ashfox, a project described as: Powerful Blockbench MCP server and AI-native low-poly workbench for modeling, pixel texturing, rigging, animation, and game-ready exports from a prompt.

sigee-min/ashfox · 199 tokens

vision-memory-mcp copilot-instructions.md

Copilot instructions for putervision/vision-memory-mcp, covering visual memory (vision-memory-mcp), 1. mandatory workflow & priority, 2. tool reference summary (15 core mcp tools), state memory (state-memory-mcp) and 1. priority order.

putervision/vision-memory-mcp · 1,791 tokens

vision-memory-mcp CLAUDE.md

Claude Code instructions for putervision/vision-memory-mcp, covering visual memory (vision-memory-mcp), 1. mandatory workflow & priority, 2. tool reference summary (15 core mcp tools), state memory (state-memory-mcp) and 1. priority order.

putervision/vision-memory-mcp · 1,791 tokens

workflow-atlas AGENTS.md

AGENTS.md instructions for claudiu-deving/workflow-atlas, covering agent setup, run it, tests, what this is for and the workflow model: an infinite-nested canvas.

claudiu-deving/workflow-atlas · 2,226 tokens

commander AGENTS.md

AGENTS.md instructions for autohandai/commander, covering all agents development standards, 🎯 mandatory requirements for all agents, you write the tdd and then write the feature implementation, architecture pattern - strict compliance and modular structure (required).

autohandai/commander · 2,227 tokens

memory-bank-mcp copilot-instructions.md

Copilot instructions for diaz3618/memory-bank-mcp, covering memory bank — copilot instructions, mandatory workflow (every task, no exceptions), start of task, during task and end of task.

diaz3618/memory-bank-mcp · 1,350 tokens