agentleFS
dperezcabreradperezcabrera/pico-skills/.claude/skills/add-actuator/SKILL.md

add-actuator

Skill4 starsChanged 4 months agoMITView on GitHub

Add health/info/metrics actuator endpoints to a pico-boot app, or contribute HealthIndicator/InfoContributor components. Use when adding Kubernetes probes, health checks, or observability endpoints.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add pico-actuator health/info endpoints for: $ARGUMENTS

    line 10
  2. Very specific:

    Keep check() cheap; cache expensive probes (indicators are singletons — store the last result + timestamp on self).

    line 62
  3. Very specific:

    Never point livenessProbe at /health or /health/ready: a slow dependency would restart healthy pods.

    line 64
  4. Distinctive:

    Put only recoverable dependencies behind readiness (database, broker).

    line 66

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

Add Actuator

Add pico-actuator health/info endpoints for: $ARGUMENTS

What pico-actuator provides

  • GET /actuator/health — overall status + per-component detail (200/503)
  • GET /actuator/health/live — liveness (always UP; wire to livenessProbe)
  • GET /actuator/health/ready — readiness (aggregate; wire to readinessProbe)
  • GET /actuator/info — static config + dynamic contributors
  • GET /actuator/metrics — Prometheus default registry (needs pico-actuator[metrics])

Steps

  1. Add dependency to pyproject.toml:
    "pico-actuator>=0.2.2",
    The endpoints appear with zero config — pico-boot auto-discovers the module.
  2. Optional config in application.yaml (all fields have defaults):
    actuator:
      show_components: true       # per-indicator detail in /health
      check_timeout_seconds: 5.0  # per-indicator time budget
      info:
        app: my-service
  3. Contribute a health indicator — a @component satisfying the HealthIndicator protocol (name attr + check()); no registration:
    from pico_ioc import component
    
    @component
    class DbHealth:
        name = "db"
    
        def __init__(self, engine: Engine):
            self.engine = engine
    
        def check(self):  # sync or async; dict or truthy
            self.engine.connect().close()
            return {"status": "UP"}
    Indicators run concurrently, each bounded by check_timeout_seconds. A raising or timed-out indicator reports its component DOWN — the endpoint never 500s.
  4. Contribute /info data the same way with contribute() -> dict (InfoContributor protocol).

Rules

  • Keep check() cheap; cache expensive probes (indicators are singletons — store the last result + timestamp on self).
  • Never point livenessProbe at /health or /health/ready: a slow dependency would restart healthy pods.
  • Put only recoverable dependencies behind readiness (database, broker).

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.