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

Framework-agnostic persistent memory and self-improvement loops for AI agents. Scaffolds shared state, task queues, and learnings files that can be read/written by Claude, Gemini, and Antigravity. Use this to initialize an Agentic OS layer in any workspace and instruct agents on how to use it.

Use this Skill: https://skilld.dev/gh/genericservice/claude-skills/agentic-os

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

SKILL.md

≈77 tokens for metadata: the name and description. ≈1.5k when used: this file. ≈916 more on demand in 3 files.

Description uses 3.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈307 characters, or 3.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Agentic OS

This skill establishes a framework-agnostic Agentic Operating System layer in a project workspace. It enables Claude, Gemini, and Antigravity to share persistent operational memory, coordinate via task queues, and continuously improve through structured feedback loops.

The Core Concept

An Agentic OS solves the "blank slate" problem. Without it, every agent session starts fresh, requiring manual context loading and repeating past mistakes. By centralizing state and learnings into an .agent/ directory, any agent runtime can pick up exactly where the last one left off and apply compounded knowledge.

Initialization

To set up the Agentic OS scaffolding in a new project, run:

bash ~/.agents/skills/agentic-os/scripts/init-os.sh

This creates the following structure at the root of the project:

.agent/
  ├── state/
  │   ├── last-run.json      # Global log of the last agent actions
  │   ├── tasks.json         # Shared queue of pending/completed tasks
  │   ├── errors.json        # Log of unresolved task failures
  │   └── status.md          # Output of the command-center skill
  ├── learnings/             # Per-skill feedback loops
  │   └── template.json
  └── evals/                 # Per-skill evaluation criteria
      └── template.json

Agent Directives

Whenever you operate in a project that has an .agent/ directory, you MUST adhere to the following workflow:

1. Pre-Task: Load State & Learnings

Before executing a specialized task or skill:

  • Read State: Check .agent/state/last-run.json to understand what was recently completed. Check .agent/state/tasks.json if you need to pull a task from the queue.
  • Read Learnings: If you are about to perform a specific skill (e.g., write-draft), check if .agent/learnings/write-draft.json exists. If it does, read it and explicitly apply its rule_change entries to your approach.
  • Read Evals: Check if .agent/evals/<skill>.json exists to understand the definition of "done".

2. Execution & Evaluation (The Learnings Loop)

After generating your output but before finalizing:

  • If an eval.json exists for your task, grade your own output against its criteria. (Use python3 ~/.agents/skills/agentic-os/scripts/eval.py list --skill <skill>)
  • If you fail any criteria, revise your output.
  • Once you pass, log your verification using python3 ~/.agents/skills/agentic-os/scripts/eval.py verify --skill <skill> --task-id <id> --notes "..."
  • Consider what worked well and what didn't during generation.

3. Post-Task: Write State & Learnings

Before you conclude your session or step:

  • Update Learnings: If you learned something new about how to do this task better in this specific project, use python3 ~/.agents/skills/agentic-os/scripts/learn.py add --skill <skill> --worked "..." --didnt "..." --rule "..." to record it.
  • Update State: Overwrite .agent/state/last-run.json with a summary of what you just did, what decisions you made, and what needs to happen next.
  • Update Queue: If you completed a task from tasks.json, mark its status as completed.
  • Log External Receipts: If you took external actions (deployments, API calls), record strict receipts or cryptographic hashes in the external_receipts array in last-run.json and the corresponding task in tasks.json to ensure an audit trail.

4. Cross-Agent Memory Unification

When you learn a critical fact about the project, the user's preferences, or system architecture, do not rely solely on your proprietary memory system (e.g., Claude's internal .claude/ memory or Gemini's save_memory / ~/.gemini/tmp/.../MEMORY.md). Proprietary memory is siloed and invisible to other agents. You MUST record project-wide facts in shared locations so that Claude, Gemini, and Antigravity can all access them:

  • Use .agent/learnings/ for specific skill rules or workflow learnings.
  • Modify GEMINI.md or CLAUDE.md for team-shared architectural conventions, repository rules, or broad project guidance.

Data Schemas

last-run.json

Used for operational continuity.

{
  "timestamp": "2026-04-25T12:00:00Z",
  "task_id": "task-123",
  "status": "completed",
  "description": "Built the new Hero component.",
  "assigned_skill": "build-component",
  "project_id": "generic-service",
  "agent_id": "antigravity",
  "user_id": "matthias",
  "outcome": {
    "result": "Success"
  },
  "trace_id": "req-12345",
  "decision_log": "Used standard Tailwind utility classes instead of custom CSS for faster rendering",
  "external_receipts": [
    {
      "action": "Vercel Preview Deployment",
      "receipt_hash": "sha256-1a2b3c..."
    }
  ]
}

errors.json

Used by the command-center skill to track unresolved failures.

[
  {
    "timestamp": "2026-04-25T12:05:00Z",
    "task_id": "task-124",
    "assigned_skill": "osint",
    "reason": "Target API returned 429 Too Many Requests after 3 retries",
    "trace_id": "req-12346",
    "decision_log": "Attempted to backoff but exceeded max wait time.",
    "resolved": false
  }
]

learnings.json (per skill)

Used to permanently correct agent behavior without modifying the base skill prompt.

{
  "skill": "build-component",
  "history": [
    {
      "date": "2026-04-21",
      "what_worked": "Extracting the SVG into a separate file kept the component clean.",
      "what_didnt": "Trying to use Next.js Image for inline SVGs caused layout shifts.",
      "rule_change": "Always put complex SVGs in a separate .tsx file and import as a React component. Do not use next/image for vectors."
    }
  ]
}

eval.json (per skill)

Used to define rigid quality gates.

{
  "skill": "build-component",
  "criteria": [
    "Component must be responsive down to 320px",
    "Must not use inline styles",
    "Must be exported as a default export"
  ]
}

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.

No alerts3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    The skill provides a shared state and memory framework for AI agents. It includes shell scripts and Python tools that use standard development utilities (like Git) to manage a project-level state directory. There is a low risk of indirect prompt injection as agents are instructed to follow 'rule changes' found in locally generated JSON files, which could be modified by external processes or untrusted data.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at b07f28f. 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.

Activeupdated 7 months ago
version
1.1.0

README badge

README badge for genericservice/claude-skills/agentic-os