Index of every page on this site: llms.txt
All skills
Run it yourself

Audit or design agent-facing product capabilities: action/context parity, discoverable contracts, safe mutations, verifiable outcomes, and recovery. Use for explicit agent-readiness reviews of apps, repos, CLIs, APIs, MCP/A2A integrations, or Agent Skills; not every general code or documentation task.

Use this Skill: https://skilld.dev/gh/tristanmanchester/agent-skills/agent-use

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencessecurity-recovery.md

≈1.7k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Security, safety, and recovery patterns

Agent-useful systems should be safe by construction. Agents can move quickly, retry aggressively, and compose tools in surprising ways. The interface must make correct, reversible, auditable behavior the path of least resistance.

Risk levels

Classify every action.

Level Examples Default requirement
Read list, get, search, inspect logs scoped read permission, bounded output
Local reversible write create draft, modify local file, update test fixture preview/diff, version history
Remote reversible write create project, update setting, archive item scoped write permission, idempotency, audit log
Destructive or costly delete, charge, deploy prod, rotate secrets, send external message dry-run, explicit approval, rollback/soft delete where possible
Irreversible/high-impact legal/financial/medical action, public broadcast, permanent deletion human approval and often out-of-band controls

Least privilege

Good agent auth design:

  • Read-only credentials are easy to create.
  • Write scopes are granular.
  • Destructive scopes are separate.
  • Tokens can be limited by workspace/project/environment.
  • Tokens expire and can be rotated.
  • Permission errors identify the minimum missing scope.
  • Docs show least-privilege examples for common tasks.

Bad patterns:

  • One API key grants everything.
  • Scopes are undocumented.
  • Permission denied errors do not say what is missing.
  • Agents must use a human’s full session cookie.

Human approval

Approval should be explicit, reviewable, and proportional.

Good approval payloads include:

  • Action name.
  • Target object IDs and names.
  • Parameters.
  • Side effects.
  • Risk level.
  • Dry-run result or diff.
  • Rollback plan.
  • Expiry time.
  • Requesting actor/agent.

Avoid vague approval prompts such as “Allow this action?” without a diff or target.

Dry-run and preview

Dry-run should be a first-class execution mode, not a separate approximate validator.

A good dry-run returns:

  • Whether the action would be allowed.
  • Validation errors.
  • Objects that would change.
  • Estimated cost/time.
  • External side effects.
  • Warnings.
  • Required approval level.
  • Idempotency key or operation token that can be used to apply the approved change.

Idempotency

Idempotency prevents duplicate side effects during retries.

Recommended patterns:

  • Mutating create/update operations accept Idempotency-Key or equivalent.
  • Server stores key, request hash, result, and expiry.
  • Repeated identical request returns same result.
  • Reused key with different request returns conflict.
  • Response includes whether result was newly created or replayed.

CLI equivalent:

product project create --name staging --idempotency-key task-2026-06-29-staging --output json

Tool equivalent:

{
  "idempotency_key": "task-2026-06-29-staging",
  "name": "staging"
}

Error envelopes

Errors should be stable and actionable.

Recommended fields:

{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests for this token.",
    "retryable": true,
    "retry_after_seconds": 30,
    "remediation": "Retry after the indicated delay or reduce request rate.",
    "details": {
      "limit": 100,
      "window_seconds": 60
    },
    "correlation_id": "req_123"
  }
}

Common codes:

  • validation_failed
  • permission_denied
  • not_found
  • conflict
  • rate_limited
  • temporarily_unavailable
  • precondition_required
  • approval_required
  • idempotency_conflict
  • partial_success

Retryability

Document retry behavior for every error class.

  • Retryable: rate limit, timeout, transient upstream failure.
  • Maybe retryable after state change: conflict, locked resource, precondition failed.
  • Not retryable without user/action change: validation, permission, not found.

Give agents enough information to choose correctly.

Long-running jobs

Use jobs for operations that may exceed request/command time.

Job model:

{
  "job_id": "job_123",
  "status": "running",
  "progress": {
    "completed": 42,
    "total": 100,
    "message": "Processing files"
  },
  "created_at": "2026-06-29T10:00:00Z",
  "updated_at": "2026-06-29T10:01:00Z",
  "logs_url": "https://example.com/jobs/job_123/logs",
  "result_url": null,
  "retryable": true,
  "correlation_id": "req_123"
}

Add:

  • Status endpoint.
  • Cancellation endpoint when safe.
  • Output links.
  • Error details.
  • Retention policy.
  • Resume/checkpoint support for large work.

Rollback and undo

Rollback options, from strongest to weakest:

  1. Transaction rollback before commit.
  2. Version history restore.
  3. Soft delete and restore.
  4. Compensating action.
  5. Manual repair runbook.

Document which applies. If no rollback exists, require stronger preview and approval.

Audit logs

Agent actions should be auditable.

Log:

  • Actor/user/agent identity.
  • Credential or integration ID.
  • Timestamp.
  • Action.
  • Target object IDs.
  • Parameters or redacted parameter summary.
  • Dry-run/apply distinction.
  • Approval record.
  • Result.
  • Correlation ID.
  • Rollback link/status.

Do not log secrets or sensitive payloads unnecessarily.

Sandboxes

A sandbox or test mode dramatically improves agent reliability.

Good sandbox properties:

  • Similar schemas and errors to production.
  • Fake external side effects.
  • Easy reset fixtures.
  • Clear visual/API distinction from production.
  • Low-friction credentials.
  • Examples use sandbox by default.

Prompt-injection and untrusted content

Agents may ingest docs, user files, webpages, issue comments, emails, or logs that contain malicious instructions.

Interface mitigations:

  • Separate data from instructions.
  • Mark untrusted content in tool responses.
  • Do not include secrets in broad context blobs.
  • Require scoped tools and user approval for sensitive actions.
  • Let agents cite/source retrieved content.
  • Provide safe parsers and sanitizers for common file types.
  • Avoid tools that execute code from untrusted content by default.

Bot access policy

For public websites and APIs, document automation expectations:

  • Which user agents/bots are allowed.
  • Rate limits.
  • Preferred docs/index endpoints.
  • Whether markdown variants are available.
  • How to authenticate.
  • Contact/support for high-volume access.

Safety review questions

Ask these before launch:

  • What is the worst thing an agent can do with the default credential?
  • Can a read-only task accidentally write?
  • Can retries duplicate side effects?
  • Can the agent preview a destructive action?
  • Can a human see exactly what will change?
  • Can the action be undone?
  • Are permission failures actionable?
  • Are logs sufficient for incident response?
  • Are secrets excluded from contexts and logs?
  • Are untrusted documents treated as data, not instructions?

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill 'agent-use' is a comprehensive toolkit for auditing and designing agent-ready systems. It includes documentation, templates, and Python scripts for scanning repositories and websites. Security analysis found no malicious intent; identified network and command execution patterns are aligned with the skill's primary purpose as an auditing tool.

  • Socket1mo

    1 alert: gptAnomaly

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 3323bc9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Steadyupdated last month
metadata
{
  "version": "3.0.0",
  "reviewed": "2026-09-13"
}
Other metadata
compatibility
Local helper scripts require Python 3.10+; structural validation also requires PyYAML 6.0.3 or later in major 6. Network and execution checks need separately authorised tools and environments.

README badge

README badge for tristanmanchester/agent-skills/agent-use