agentleFS
rainoftimerainoftime/pl-skills/capability-system/SKILL.md

capability-system

Skill17 starsChanged 9 months agoApache-2.0View on GitHub

Implement capability-based security for fine-grained access control and least privilege.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use unforgeable tokens (cryptographic or memory-safe references)

    line 44
  2. Distinctive:

    Consider revocation carefully (may be impossible without tracking)

    line 46
  3. Distinctive:

    Use object capabilities for fine-grained control

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Capability System

Capability-based security uses unforgeable tokens (capabilities) to represent authority. Instead of checking "who you are" (ACLs), it checks "what you hold" (capabilities), enabling fine-grained least privilege.

When to Use This Skill

  • Building secure operating systems
  • Implementing sandboxing
  • Designing least-privilege systems
  • Distributed object systems
  • Secure browsers (seL4, Capsicum)

What This Skill Does

  1. Capability Tokens: Unforgeable references to resources
  2. Authority Delegation: Transfer capabilities between principals
  3. Attenuation: Reduce capability powers
  4. Revocation: Revoke delegated capabilities
  5. Confinement: Restrict capability propagation

Key Concepts

ConceptDescription
CapabilityUnforgeable token granting authority
AttenuationReduce capability permissions
DelegationTransfer capability to another principal
RevocationInvalidate capability and descendants
ConfinementRestrict capability propagation
FacetSpecific interface to an object

Tips

  • Use unforgeable tokens (cryptographic or memory-safe references)
  • Implement proper attenuation
  • Consider revocation carefully (may be impossible without tracking)
  • Use object capabilities for fine-grained control
  • Log capability usage for auditing

Common Use Cases

  • Secure operating systems (seL4, Fuchsia)
  • Browser sandboxing
  • Distributed object systems
  • Cloud access control
  • IoT device security

Related Skills

  • information-flow-analyzer - Track information flow
  • linear-type-implementer - Linear capabilities
  • sandbox-builder - Use capabilities for sandboxing
  • ownership-type-system - Ownership and capabilities

Canonical References

ReferenceWhy It Matters
Levy "Capability-Based Computer Systems"Classic text
Miller "Capability Myths Demolished"Clarifies misconceptions
Shapiro et al. "EROS: A Capability System"Practical system

Tradeoffs and Limitations

Approach Tradeoffs

ApproachProsCons
Pure capabilitiesComposable, no ambient authorityRequires language support
Hybrid (ACL + caps)PracticalComplex
Cryptographic capsDistributedPerformance

When NOT to Use This Skill

  • Simple access control needs
  • When ACLs suffice
  • Performance-critical paths (crypto overhead)

Limitations

  • Revocation is complex
  • Confinement is hard
  • Lost capabilities are hard to recover

Assessment Criteria

A high-quality implementation should have:

CriterionWhat to Look For
UnforgeabilityCapabilities cannot be forged
AttenuationPermissions can be reduced
DelegationCapabilities can be shared
RevocationCapabilities can be revoked

Quality Indicators

✅ Good: Unforgeable, supports attenuation and revocation ⚠️ Warning: Forgery possible, no revocation ❌ Bad: No security guarantees

Research Tools & Artifacts

Capability systems:

SystemWhat to Learn
EROSCapability OS
CapROSModern capability OS
FuchsiaCapability-based

Research Frontiers

1. Distributed Capabilities

  • Goal: Capabilities across trust boundaries
  • Approach: Cryptographic capabilities

Implementation Pitfalls

PitfallReal ConsequenceSolution
ForgerySecurity breachCryptographic seals

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.

Reviews can't be read right now.

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.