Logo vun Ccsn Find Simplifications

Ccsn Find Simplifications

CommunautéitBeléift
kenryu42
ccsn-find-simplifications

Use when working in the cc-safety-net repo to find non-obvious simplification candidates: dead, duplicated, speculative, over-built, or contract-exceeding surfaces in the shell parser, analyzer, guards, secret protection, policy, rules manager, audit log, hosts, CLI, or GUI. Produces evidence-backed proposals for the maintainer, not a pile of guesses.

Iwwersiicht

Editeurkenryu42
Repositorycc-safety-net
Skill-Nummccsn-find-simplifications
Stären
1.6K
Forks
84
Matgeliwwert Fichieren
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum kenryu42 op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Ccsn Find Simplifications an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/kenryu42/cc-safety-net/tree/main/.agents/skills/ccsn-find-simplifications
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kenryu42/cc-safety-net.git /tmp/cc-safety-net
mkdir -p .claude/skills
cp -r /tmp/cc-safety-net/.agents/skills/ccsn-find-simplifications .claude/skills/ccsn-find-simplifications
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ccsn Find Simplifications an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Ccsn Find Simplifications automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Ccsn Find Simplifications net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Finding CC Safety Net Simplifications

This skill turns a broad "find things to simplify" request into evidence-backed candidates that remove or collapse existing surface area. It is guidance, not a checklist: follow the code, keep judgment active, and prefer a few well-proven candidates over many thin ones.

Over-engineering is this repo's documented dominant failure mode (see Scope Discipline in AGENTS.md), so simplification proposals have a tailwind — but the same discipline applies to the proposals themselves: each one must name the concrete cost the current code carries, not just "this looks complex."

Start With Repo Context

  • Read AGENTS.md (Scope Discipline, Testing, Style Guide, Knip rules), REVIEW.md (threat model and review boundary), and SECURITY.md (the standard/strict/paranoid mode contract).
  • Read docs/residual-risk.md before judging anything in src/core/shell, src/gate/analyzer, src/gate/guards, or src/core/rules. Adjudicated bypass families are settled decisions; fixtures pinning them are load-bearing even when nothing else references them. Read docs/secret-protection-known-limitations.md before judging src/gate/secret.
  • The mode contract is the repo's central seam: standard mode blocks recognizable accidental destruction and is explicitly not bypass-proof; strict/paranoid fail closed. Complexity that exists only to chase crafted adversarial shapes in standard mode exceeds the documented contract — REVIEW.md forbids adding it, which makes any existing instance a prime simplification candidate. Conversely, fail-closed machinery in strict/paranoid is contract, not bloat.

Treat As Intentional By Default

  • Every per-host directory under src/hosts (amp, claude-code, codex, cursor, pi, and the rest). Each exists because a real host tool needs it; propose deleting one only if the user says the host is dropped. Removing an unused hook, command, or method inside one is still fair game, and so is folding duplication into the shared host machinery (src/hosts/detect, src/hosts/install, src/hosts/hook, src/hosts/templates) when no host's enforcement weakens.
  • The residual-risk registry pair (docs/residual-risk-registry.json + docs/residual-risk.md) and the strict/paranoid fail-closed fixtures that back its families.
  • The behavioral contract corpus: tests/gate/behavioral-contract-cases.ts, tests/gate/pipeline-contract-cases.ts, and the hand-edited verdict table tests/fixtures/gate/harvested-verdicts.jsonl. Per AGENTS.md, a row there is a stated expectation, not a recording; a proposal that needs a row flipped must name the row and argue the flip on contract grounds. The two snapshot surfaces (explain in tests/cli/explain, doctor --json in tests/cli/doctor) are byte contracts, not incidental output.
  • The zero-runtime-dependency posture. Hand-rolled shell parsing, JSONC/TOML reading, and atomic writes are the product, not a hand-rolling smell — this is a security hook with a deliberately minimal supply chain. Do not propose swapping the parser, a guard, or a reader in src/core/io for an npm package; a new dependency is a maintainer decision to propose separately, never a "low effort" cleanup.
  • The rules manager's resource limits (src/rules-manager/resource-limits.ts) and the parser's exhaustion budgets. SECURITY.md publishes their numbers; they are contract.
  • Adversarial-looking strings in tests are analyzer input data, never executed. Do not propose removing them as dangerous or redundant without checking which contract row or residual-risk family they pin.

What Counts As A Strong Candidate

A strong simplification removes, folds, or demotes something real, with evidence the current design costs more than it buys:

  • An internal symbol, gate pipeline stage, host adapter method, or GUI implementation surface has no production consumer. For public exports (src/entries/api.ts), configuration, policy knobs, and CLI or GUI features, require contract or deprecation evidence; repository-local absence cannot prove that external users do not depend on them.
  • Tests or comments are the only consumers, and the behavior they pin is not a mode-contract guarantee, a contract-corpus row, or a residual-risk fixture.
  • Two representations mirror the same fact (e.g. a value stored on the shell model in src/core/shell/model.ts and re-derived in the analyzer, a fact computed in src/gate/facts.ts and again in a guard, or parallel per-host code that could share one path without weakening any host's enforcement). Note that bun run check already gates textual duplication via jscpd — focus on structural duplication it cannot see.
  • Standard-mode parser or rule logic whose only justification is a deliberately crafted bypass shape: per REVIEW.md that belongs to strict/paranoid fail-closed handling or documented residual risk, not emulation code.
  • Defensive copies, freezes, re-validation, or normalization applied to values a same-process trusted caller already owns. The trust boundary here is precise: hook payloads from host tools, user config/policy files, rulebooks fetched by the rules manager, and analyzed command strings are untrusted and deserve validation; values passed between this repo's own modules ordinarily do not.
  • Speculative generality with no consumer: registries with one entry, schemas ahead of their first real user, fields whose values are forced constants, options no host or entry sets.
  • An invariant, fallback, or special-case test that exists only to protect an unused API.
  • The simplified behavior may differ slightly, but the new behavior is still reasonable, within the mode contract, and easier to explain.

Thin candidates are not enough: one typo, a single knip run, "this looks complex" without call-site proof, or anything whose removal would create a false negative for recognizable danger in standard mode.

Survey Broadly

Use parallel subagents when the user asks for breadth. Give each a domain and require evidence, not guesses:

  • Shell parser and model (src/core/shell): normalization passes, node kinds, fields nothing downstream reads.
  • Analyzer and rules (src/gate/analyzer, src/core/rules): rule machinery, severity plumbing, contract-exceeding emulation.
  • Guards, secret protection, and policy (src/gate/guards, src/gate/secret, src/core/policy): backstops mirroring the same fact, config knobs nothing sets.
  • Gate pipeline and core utilities (src/gate/*.ts, src/core/*.ts, src/core/io, src/core/git, src/core/paths): intake/analysis/decision plumbing, trace and explain scaffolding, helpers with one caller.
  • Rules manager and audit log (src/rules-manager, src/audit): sync and resolver states, retention and display paths no command reaches.
  • CLI and entries (src/cli, src/entries): commands, flags, install/doctor/policy/rule flows, output formatting, entry files that re-export what nothing imports.
  • Hosts (src/hosts per-host directories and shared machinery, hooks/, the plugin manifests): per-host duplication, unused adapter methods, template branches no host takes.
  • GUI (src/gui, src/gui/frontend): surfaces or state with no interaction path.
  • Tests, scripts, build, evals (tests/, scripts/, evals/): redundant fixtures, helpers duplicating each other, verification scripts checking what another gate already checks.

Do not let the first good candidate stop the survey, and start with the largest production files — duplicated lifecycle and defensive machinery costs more than stray unused symbols.

Prove Or Reject Each Candidate

Classify consumers before writing anything up:

  • Production corpus: src/, hooks/, scripts/ used at build/publish time, the plugin manifests (.claude-plugin/plugin.json, .claude-plugin/marketplace.json, .codex-plugin/plugin.json, kimi.plugin.json), package.json bin/pi/peerDependencies wiring, and the tracked skills/ directory. Reachability runs through src/entries/*: a symbol only an entry file exports is still production if that entry is a published surface. Ignore dist/ (generated) and anything git ls-files does not list.
  • Non-production corpus: tests/ and comments. README and other docs are non-runtime evidence, but count as contract consumers for public surfaces.
  • Ambiguous corpus: tests/e2e, tests/e2e-live, and evals/ exercise real host-tool wiring — these often pin integration contracts; read them before classifying.

Use rg first: the exact symbol, config key, CLI flag, rule id, host name string, and any wire/JSON strings (hosts dispatch on string tool names, so grep strings, not just identifiers). Then read the call sites. knip helps but runs in --production mode — a /** @internal */ tag means test-only-by-design, not dead; and dynamic string dispatch hides real consumers from it.

Reject or downgrade when:

  • A production consumer exists and removal would be a feature decision, not a cleanup.
  • The surface is pinned by the mode contract, a contract-corpus row, a residual-risk family, or a documented decision in docs/, and the new evidence does not beat the recorded rationale.
  • Removal would cause a standard-mode false negative for a plausible accidental command, or weaken strict/paranoid fail-closed behavior.
  • Removal forces broad churn without reducing public surface or required behavior.

Report, Don't Restructure

This repo has no notes system and a solo maintainer. The deliverable is a report to the user, strongest evidence first. For each candidate:

  • What: the exact symbols/files to remove, fold, or demote, with file:line references.
  • Evidence: production vs test/doc consumers found, and the searches that establish absence.
  • What we give up: the strongest counterargument, stated honestly — including any behavior change and why it stays within the mode contract.
  • Blast radius: tests, docs, fixtures, contract rows, and snapshots that would change with it.

Do not create new docs, directories, dependencies, or process files to hold findings — placement of new repo structure is the maintainer's call. Do not implement removals during a survey unless the user asked for fixes; when they do, implement the smallest change per candidate, keep tests/ mirroring src/, and follow the Red–Green rule for any behavior change: the failing expectation (a contract row or stated assertion) lands first, and re-recording a snapshot or editing the verdict table is never the first step.

Validation

A findings-only survey needs no checks. When candidates are implemented, run bun run check once at the end (never its pieces separately). If knip then flags fallout, fix the root cause per the Knip section of AGENTS.md — unexport, tag /** @internal */, or trim the barrel; never touch ignoreIssues. If a change flips a verdict-table row or re-records one of the two permitted snapshots, the commit message must name which entries changed and why.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Ccsn Find Simplifications?

Use when working in the cc-safety-net repo to find non-obvious simplification candidates: dead, duplicated, speculative, over-built, or contract-exceeding surfaces in the shell parser, analyzer, guards, secret protection, policy, rules manager, audit log, hosts, CLI, or GUI. Produces evidence-backed proposals for the maintainer, not a pile of guesses.

Firwat Ccsn Find Simplifications op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ccsn Find Simplifications besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Ccsn Find Simplifications an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/kenryu42/cc-safety-net/tree/main/.agents/skills/ccsn-find-simplifications an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Ccsn Find Simplifications benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Ccsn Find Simplifications benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ccsn Find Simplifications domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Ccsn Find Simplifications gratis?

Jo. De Skill gëtt vum kenryu42 ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇