agentleFS
dperezcabreradperezcabrera/pico-skills/.claude/skills/add-server-auth/SKILL.md

add-server-auth

Skill4 starsChanged 4 months agoMITView on GitHub

Add embedded auth server to a pico-boot app. Provides JWT issuance, wallet challenge/verify login, and JWKS endpoint via pico-server-auth.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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-server-auth to the project: $ARGUMENTS

    line 10
  2. Very specific:

    Ensure auth_client.issuer matches server_auth.issuer

    line 45
  3. Very specific:

    Create a minimal main.py:

    line 49

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

Add pico-server-auth to the project: $ARGUMENTS

What pico-server-auth provides

  • POST /auth/challenge — wallet login step 1 (nonce)
  • POST /auth/wallet — wallet login step 2 (verify signature, issue JWT)
  • POST /auth/login — password login (admin bootstrap)
  • GET /auth/jwks — JWKS for pico-client-auth token validation

Supports ML-DSA-65 (Dilithia), Ed25519 (Solana), secp256k1 (Ethereum) wallet signatures.

Steps

  1. Add dependency to pyproject.toml:
    "pico-server-auth>=0.2.2",
  2. Add config to application.yaml:
    server_auth:
      issuer: "http://localhost:8000"
      audience: "my-app"
      auto_create_admin: true
      admin_email: "admin@example.com"
      admin_password: "changeme"
      challenge_ttl_seconds: 60
      supported_wallet_algorithms:
        - "ML-DSA-65"
        - "Ed25519"
        - "secp256k1"
  3. For embedded mode (auth in same process as your app):
    • pico-server-auth is auto-discovered by pico-boot — no code changes needed
    • Ensure auth_client.issuer matches server_auth.issuer
    • Both share the same FastAPI app
  4. For standalone mode (separate auth service):
    • Create a minimal main.py:
      from pico_boot import init
      from pico_ioc import configuration, YamlTreeSource
      from fastapi import FastAPI
      
      container = init(
          modules=[],  # pico_server_auth is auto-discovered by pico-boot
          config=configuration(YamlTreeSource("application.yaml")),
      )
      app = container.get(FastAPI)
    • Other services point auth_client.issuer to this service's URL

Custom ChallengeStore

The default in-memory store works for single-process. For multi-instance, register a custom @component implementing ChallengeStore:

from pico_ioc import component
from pico_server_auth import ChallengeStore

@component
class RedisChallengeStore:
    def create(self, address: str) -> str: ...
    def validate(self, address: str, nonce: str) -> bool: ...
    def cleanup(self) -> int: ...

Checklist

  • Dependency added to pyproject.toml
  • Config section server_auth in application.yaml
  • auth_client.issuer matches server_auth.issuer (if using pico-client-auth)
  • Wallet algorithms configured for your use case
  • Admin credentials changed from defaults

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.