agentleFS
zedarvateszedarvates/botte-secrete/skills/preflight/SKILL.md

preflight

Skill2 starsChanged 3 months agoMITView on GitHub

Make the token-saving optimizations automatic instead of opt-in — a committed project policy plus a UserPromptSubmit hook that injects the prefer-local rules and suggested skills on every prompt, so a fresh prompt (after a component update, or from another dev/agent) never bypasses local routing. Use when the user wants the prefer-local behaviour enforced automatically, consistency across multiple devs/agents, or asks why their prompts aren't using local models by default.

47 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use adr, ship and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • asterkinSkill

    adr

    Create Architecture Decision Records (ADRs) following project standards. Guides template usage, process, and best practices for documenting architecturally significant decisions.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 5 projects that use this

  • Google CloudSkill

    triage

    Gather context on a change or bug and plan the implementation.

    Also in 4 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • DockerSkill

    review-pr

    Review one or more incoming Docker documentation pull requests as a maintainer. Independently validate technical claims, assess editorial fit and information architecture, choose a verdict, and draft exact inline or PR-wide feedback behind a confirmation gate. Use for requests such as "review PR 123", "is this PR correct?", "does this information belong here?", "validate this PR", or "help review backlog PRs". Do not use to maintain or fix a PR you own; use maintain-pr for that.

    Also in 3 projects that use this

The file

Files
SKILL.md

preflight — enforce prefer-local, automatically

The gap this closes: the optimizations (local routing, prompt improvement, skill search) are opt-in, so a fresh prompt — especially after an update or from another dev/agent — bypasses them. Enforcement that doesn't depend on the model remembering:

1. Committed policy (.botte/policy.md)

The shared source of truth every dev and agent reads: default to local for cheap work, escalate only hard reasoning, improve big prompts, run /checkup after updates, budget. Commit it so multi-dev / multi-agent stays consistent.

from skills.preflight import policy
policy.write_default(project)          # idempotent
policy.ensure_agents_pointer(project)  # links AGENTS.md/CLAUDE.md to it

2. Preflight hook (every turn, ~0 cost)

A UserPromptSubmit hook that, before the expensive model sees the prompt, injects: the prefer-local rule, the top relevant skills (lexical find_skills, 0 tokens), and an improve_prompt nudge for big/ambiguous requests. Crash-proof (a hook must never block you) and fast (no LLM call).

echo '{"prompt":"classify these tickets","cwd":"."}' | python -m skills.preflight.hook

The deployer wires it automatically into .claude/settings.json:

{"hooks": {"UserPromptSubmit": [{"hooks": [
  {"type": "command", "command": "python -m skills.preflight.hook"}]}]}}

Install

python -m skills.bootstrap.cli <project> writes the policy, wires the hook and points AGENTS.md at the policy — all non-destructively. Works in any harness with a pre-prompt hook (Claude Code today); the hook script is standalone.

Related: [[bootstrap]] (installs this), [[checkup]] (the canonical audit), [[skill_finder]], [[prompt_improver]], [[auto_router]].

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.