agentleFS
IgorGanapolskyIgorGanapolsky/ThumbGate/.agents/skills/thumbgate/SKILL.md

thumbgate

Skill29 starsChanged 7 months agoMITView on GitHub

Pre-action checks for AI coding agents — capture thumbs-up/down feedback, generate prevention rules, and block known-bad patterns before they execute. Use when setting up ThumbGate, capturing feedback on agent actions, checking active prevention rules, debugging blocked actions, or exporting DPO training data. Triggers on: "thumbgate", "check", "block mistake", "prevention rule", "feedback", "thumbs up", "thumbs down", "capture feedback", "what went wrong".

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If ThumbGate is not yet installed in this project:

    line 23
  2. Distinctive:

    When an agent action succeeds or fails, capture it:

    line 36
  3. Distinctive:

    When the MCP server is running, these tools are available to your agent:

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ThumbGate — Pre-Action Checks for AI Agents

ThumbGate turns thumbs-up/down feedback into hard enforcement checks that block known-bad agent actions before they execute. Think of it as an immune system for your AI agent.

npm package: thumbgate Docs: https://github.com/IgorGanapolsky/ThumbGate

Quick Start

If ThumbGate is not yet installed in this project:

npx thumbgate init

This bootstraps .thumbgate/ data directory and .mcp.json config. Works with Codex, Cursor, Codex, Gemini CLI, Amp, OpenCode, and any MCP-compatible agent.

Core Commands

Capture feedback

When an agent action succeeds or fails, capture it:

# Thumbs down — something went wrong
node .Codex/scripts/feedback/capture-feedback.js \
  --feedback=down \
  --context="what happened" \
  --what-went-wrong="specific failure" \
  --what-to-change="specific fix" \
  --tags="tag1,tag2"

# Thumbs up — something worked
node .Codex/scripts/feedback/capture-feedback.js \
  --feedback=up \
  --context="what happened" \
  --what-worked="specific thing that worked" \
  --tags="tag1,tag2"

View active gates and rules

npm run feedback:rules       # Show prevention rules generated from feedback
npm run feedback:stats       # Feedback counts by signal, domain, importance
npm run feedback:summary     # Aggregated summary of all feedback

Check system health

npm run self-heal:check      # Verify 4/4 subsystems healthy

Export training data (Pro)

npm run feedback:export:dpo  # Export DPO preference pairs for fine-tuning

How Gates Work

  1. Feedback — You give thumbs-up or thumbs-down on agent actions
  2. Rules — Repeated failures auto-promote into prevention rules via Thompson Sampling
  3. Gates — Rules become PreToolUse hooks that block the agent before it repeats the mistake

Gates are enforced via MCP PreToolUse hooks — the agent literally cannot execute a blocked action. This is hard enforcement, not a soft suggestion.

Architecture

ComponentWhat it does
SQLite+FTS5 lesson DBFast full-text search across all feedback
Thompson SamplingAdaptive gate sensitivity per failure domain
LanceDB + HuggingFaceLocal vector search for semantic similarity
ContextFSHierarchical context assembly with semantic caching
PreToolUse hooksHard enforcement — blocks before execution

MCP Tools Available

When the MCP server is running, these tools are available to your agent:

ToolPurpose
capture_feedbackRecord thumbs-up/down on an agent action
search_lessonsSearch past feedback by keyword, tag, or domain
recallRetrieve relevant memories for current context
prevention_rulesView active prevention rules
gate_statsSee which gates are firing and their block rates
feedback_statsFeedback counts and trends
export_dpo_pairsExport DPO training pairs (Pro)
construct_context_packBuild bounded context from feedback history

Pro Features

Pro users ($19/mo or $149/yr) unlock:

  • Visual gate debugger — see every blocked action and the gate that fired
  • Multi-hop recall — chain related lessons across hops for deeper context
  • Synthetic DPO augmentation — expand real feedback into larger training datasets
  • Gate wiring support — help enforcing your riskiest flows in the first week

Team rollout ($49/seat/mo, 3-seat minimum after intake) adds the shared hosted lesson DB, org dashboard, approval boundaries, and proof-backed workflow hardening sprint.

Upgrade: https://thumbgate-production.up.railway.app/go/pro?utm_source=skill

Detailed Reference

For setup guides per agent, see: <references/setup-guides.md> For gate configuration, see: <references/gate-config.md>

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.