agentleFS
decionisdecionis/agent-safe-pipeline/.claude/skills/agentsafe/SKILL.md

agentsafe

Skill672 starsChanged 2 days agoApache-2.0View on GitHub

Put AgentSafe in front of an agent's writes: register native executors, pin a route to a published policy, start in shadow, and stop on BLOCK and ESCALATE.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Always pass the idempotency key to the provider, and implement reconcile as a read-only lookup.

    line 44
  2. Distinctive:

    Stop on BLOCK and ESCALATE.

    line 86
  3. Distinctive:

    Never rename ALLOW, ESCALATE or BLOCK, and never map them to other words in code.

    line 88
  4. Distinctive:

    Never put keys, tokens or customer payloads in configuration files, logs or examples.

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
<!-- Generated by Decionis. Installing a newer version replaces this file. -->

AgentSafe Implementation

AgentSafe puts authorization in front of every write an agent makes. The agent sends its action to AgentSafe instead of the target. Decionis decides the exact action, and AgentSafe runs it once, holds it for a person, or refuses it. AgentSafe decides nothing itself, and the agent never receives a grant or a credential.

Source and full docs: https://github.com/decionis/agent-safe-pipeline.

Pick the shape

  • HTTP interception (agentsafe proxy). Put the gateway in front of an API. Every POST, PUT, PATCH and DELETE becomes an intent. On ALLOW it is forwarded byte for byte, once, under a single-use grant. BLOCK is refused, ESCALATE is held. Only GET, HEAD and OPTIONS pass without a decision.
  • Proposal executor (agentsafe serve). Register a handler per action. The handler does the provider call and nothing else.
  • Library (@decionis/agent-safe-pipeline). SafeExecutor, ActionRegistry, IntentCapture, DecionisGate, DecionisGrantVerifier, ShadowPipeline and AuditRecorder inside your own service.
npm install -g @decionis/agentsafe
agentsafe proxy --upstream http://localhost:3000 --port 8080
agentsafe doctor

Without a Decionis key the proxy runs a local demo authority with a synthetic policy and says so on every line. With DECIONIS_API_KEY and DECIONIS_TENANT_ID (or agentsafe login) it asks Decionis.

Register an action

registry.register("create_payout", {
  parametersSchema: JsonObjectSchema,
  execute: ({ intent, parameters, authorization, dispatch }) =>
    dispatch.run(async (idempotencyKey) => {
      // The provider call, and nothing else. Send idempotencyKey to the provider.
    }),
  reconcile: async ({ idempotencyKey }) => {
    // Read-only: ask the provider what happened to this key. Never send again.
  },
});
  • Validate parameters with a schema. Never trust fields the agent sends for policy selection.
  • Always pass the idempotency key to the provider, and implement reconcile as a read-only lookup.
  • Credentials come from the runtime per request. Handlers never hold their own.

The executor contract

New executors follow agent-safe.executors.native/1 (spec/executors/native/v1). Every run ends in exactly one of six outcomes:

OutcomeMeaningRetry?
BLOCKEDNo valid execution authority reached the executorFix the authority first
HELDAdmitted; the grant waits for the native boundaryNo
FAILED_BEFORE_DISPATCHA grant was used and nothing was sentOnly with a fresh decision and grant
COMPLETEDThe platform did the actionNo
DEFINITELY_NOT_EXECUTEDThe platform refused; nothing happenedOnly with a fresh decision and grant
UNKNOWN_AFTER_DISPATCHThe write left and the result is unknownNo; reconcile first

EffectAdapter is deprecated. Use NativeExecutor with style: "dispatch".

Pin a route to a policy

A route can select the published Decionis policy that decides it. action names what rules match; it does not select a policy.

interception:
  routes:
    - path: /decide
      action: payment.decide
      methods: [POST]
      policyId: "<published policy bundle UUID>"
      policyVersion: "<exact published version>"

The gateway binds these as parameters.policy_id and parameters.policy_version before hashing. Fields in the request body cannot override them.

Roll out

  1. Shadow first. Shadow records what Decionis would have allowed, held and refused, and executes nothing. agentsafe status shows the shadow report.
  2. Review the report with the policy owner. Change the policy, not the gateway, when outcomes are wrong.
  3. Enforce with the switch the report names.

Rules

  • Stop on BLOCK and ESCALATE. Never route around AgentSafe through another tool, API, browser or script.
  • An unreachable authority is its own state, never a verdict. Do not treat it as ALLOW.
  • Never rename ALLOW, ESCALATE or BLOCK, and never map them to other words in code.
  • Never put keys, tokens or customer payloads in configuration files, logs or examples.

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.