Script discovery annotation

From rcarmo/piclaw · View interactive version

Script discovery annotation is an AI agent skill from the GitHub repository rcarmo/piclaw. Add or validate SCRIPT_JDOC metadata on skill-shipped and workspace scripts so list_scripts and future script discovery can find them reliably.

How to use this skill

Skill file

Script Discovery Annotation

Use this skill when adding or updating TypeScript scripts that should be discoverable by list_scripts or future script-catalog tooling.

What to annotate

Apply SCRIPT_JDOC blocks to script files under surfaces such as:

Workflow

  1. Preview scaffold metadata for a file or directory:

```bash

bun ./annotate-script-jdoc.ts --path <file-or-dir>

```

  1. Write scaffold metadata in place:

```bash

bun ./annotate-script-jdoc.ts --path <file-or-dir> --write

```

  1. For helper/support modules that should not be treated as standalone entrypoints:

```bash

bun ./annotate-script-jdoc.ts --path <file-or-dir> --write --role module

```

  1. Validate that every target script has a parseable SCRIPT_JDOC block:

```bash

bun ./annotate-script-jdoc.ts --path <file-or-dir> --check

```

Review checklist

After scaffolding, hand-tune the JSON block so it reflects the real user-facing purpose:

Primary script purpose matters more than path scaffolding. Keep the metadata compact and human-facing.

Canonical fields

{
  summary?: string,
  aliases?: string[],
  domains?: string[],
  verbs?: string[],
  nouns?: string[],
  keywords?: string[],
  guidance?: string[],
  examples?: string[],
  kind?: "read-only" | "mutating" | "mixed",
  weight?: "lightweight" | "standard" | "heavy",
  role?: "entrypoint" | "module"
}

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.