agentleFS
rakaarwakyrakaarwaky/agents-arwaky/skills/devops/xdg-spec-compliance/SKILL.md

xdg-spec-compliance

Skill0 starsChanged 5 days agoMITView on GitHub

Audit and fix XDG Base Directory compliance in a repo (data/config/cache/state paths, 0700 dirs, 0600 secrets, precedence). Use when the app resolves paths with `expanduser`/`Path.home`, writes logs outside `$XDG_STATE_HOME`, or ships world-readable secrets.

  • Reads credentials

The file

Files
SKILL.md

XDG Base Directory Compliance

Audit and fix a repo's path resolution against the XDG Base Directory spec: run the four-step audit order, check the seven rules projects break, and fix the installer, tests, and provisioner where each rule fails.

Global Rules

  • Quote the spec, don't reason from memory. The authoritative text is v0.8 at https://specifications.freedesktop.org/basedir/latest/ — three rules are routinely guessed wrong; the rules reference is the single home.
  • Reproduce before claiming. Relative/tilde env values and mkdir umask inheritance are invisible to reading alone; the audit order reference ends in a repro step, and no claim rests on reading alone.
  • Clean up probe junk. Any file the repro dumps into the repo is removed before the run is done; git status must be clean at the end.

Routing

StepReferencePurpose
Audit orderreferences/audit-order.mdThe four cheapest-signal-first checks: path grep, LOG/state location, write/read split, repro.
The rules projects breakreferences/rules.mdThe seven spec rules: absolute-only, empty/unset default, 0700 dirs, 0600 secrets, precedence, vendor subdir, XDG_RUNTIME_DIR.
Bash installerreferences/bash-installer.mdInstaller rules: absoluteness helper, 0700 tree, venv install, entry points.
Test it without touching the user's homereferences/testing-sandbox.mdThe import-time sandbox, the asserts, the fake-green guards, and the lazy log handler.
Destructive provisioningreferences/destructive-provisioning.mdStale-dir rename instead of rmtree, and the symlink exfiltration rule.

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.