agentic/code/addons/aiwg-utils/skills/add-behavior/SKILL.md
Scaffold a new behavior definition with BEHAVIOR.md and optional scripts inside an existing addon or framework
npx skillsauth add jmagly/aiwg add-behaviorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scaffold a new behavior definition with BEHAVIOR.md and optional scripts and inputs inside an existing addon or framework.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
| Pattern | Example | Action | |---------|---------|--------| | Named add | "add behavior auto-lint --to aiwg-utils" | Scaffold directly | | Description-driven | "create a behavior that triggers on file save" | Derive name, prompt target | | Interactive | "add behavior --interactive --to sdlc-complete" | Guided design mode | | Target omitted | "add behavior my-behavior" | Ask which addon or framework |
Behaviors are the newest AIWG artifact type. They bind reactive directives and toolsets to specific agent contexts. Unlike skills (which activate on natural language patterns) or commands (which require explicit invocation), behaviors:
Behaviors deploy primarily to OpenClaw (~/.openclaw/behaviors/) and are defined using the cross-platform BEHAVIOR.md format.
Extract from $ARGUMENTS:
<name> — kebab-case behavior name (required)--to <target> — addon or framework directory name (required)--interactive — enable guided design questionsIf either <name> or --to is missing, ask before proceeding.
Confirm the target exists:
# Check addons
ls agentic/code/addons/<target>/
# Check frameworks
ls agentic/code/frameworks/<target>/
Ask before generating:
on-file-save, on-session-start, on-tool-complete, on-agent-contextaiwg add-behavior <name> --to <target>
The generated BEHAVIOR.md uses the cross-platform format:
---
name: <name>
description: <one-sentence purpose>
version: 1.0.0
trigger: <event-type>
context:
- <file-glob-or-state>
platforms:
- openclaw
---
# Behavior Name
[Description of what this behavior does and when it activates]
## Trigger
Activates when: `<trigger event description>`
Context constraints:
- `<constraint 1>` — e.g., only in `.ts` files
- `<constraint 2>` — e.g., only during construction phase
## Directive
When triggered, the agent will:
1. [Action 1]
2. [Action 2]
3. [Action 3]
## Inputs (if applicable)
| Input | Type | Required | Description |
|-------|------|----------|-------------|
| <input> | string | Yes | What it controls |
## Scripts (if applicable)
| Script | Purpose |
|--------|---------|
| `scripts/<name>.sh` | What it does |
## Deactivation
This behavior is inactive when:
- <condition that suppresses it>
For behaviors with scripts:
mkdir -p <target>/behaviors/<name>/scripts/
# Add executable scripts
chmod +x <target>/behaviors/<name>/scripts/*.sh
For behaviors with structured inputs:
mkdir -p <target>/behaviors/<name>/inputs/
# Add JSON Schema or YAML input definitions
The CLI tool updates <target>/manifest.json. Verify:
{
"behaviors": ["existing-behavior", "<name>"]
}
<target>/behaviors/<name>/
├── BEHAVIOR.md # Behavior definition (cross-platform format)
├── scripts/ # Optional: executable scripts
└── inputs/ # Optional: structured input schemas
Manifest updated: <target>/manifest.json
Behavior Created: <name>
────────────────────────
Location: <target>/behaviors/<name>/
Created:
✓ BEHAVIOR.md
✓ scripts/ (placeholder)
✓ inputs/ (placeholder)
Manifest updated: <target>/manifest.json
Deployment target: ~/.openclaw/behaviors/<name>/
Next Steps:
1. Define trigger event and context constraints
2. Write directive steps
3. Add scripts (if external tools needed)
4. Define input schema (if parameterized)
5. Deploy: aiwg use <target> --provider openclaw
User: "add behavior session-preflight --to aiwg-utils"
Action:
aiwg add-behavior session-preflight --to aiwg-utils
Result: agentic/code/addons/aiwg-utils/behaviors/session-preflight/BEHAVIOR.md scaffolded. Defines behavior that runs aiwg doctor automatically at session start.
User: "create a behavior that lints TypeScript files on save in sdlc-complete"
Extraction: name=ts-lint-on-save, target=sdlc-complete, trigger=on-file-save, context=**/*.ts
Action:
aiwg add-behavior ts-lint-on-save --to sdlc-complete --interactive
Result: BEHAVIOR.md plus scripts/run-lint.sh.
User: "add behavior threat-model-context --to sdlc-complete"
Result: Behavior that activates when the threat-modeler agent is in context, loading relevant security rules automatically.
data-ai
Report which research-corpus radar sidecars are overdue for refresh. Computes staleness (days since last refresh vs the cadence window) for every radar, sorted most-overdue-first. Runs via `aiwg corpus radar-status`.
data-ai
Aggregate research-corpus radar sidecars into a corpus or per-cluster freshness report — totals, overdue count, per-cluster / per-GRADE / per-trajectory breakdowns, an overdue table, and per-radar rationale snippets. Runs via `aiwg corpus radar-report`.
testing
Scaffold radar/freshness sidecars for research-corpus REFs. Pulls title/authors from the citation sidecar and GRADE from the analysis doc, defaults the refresh cadence from GRADE and the cluster from a corpus-local map, and stamps documentation/radar/REF-XXX-radar.md. Runs via `aiwg corpus radar-init`.
data-ai
Compute an entity's publication trajectory — per-year paper counts, topic drift, hot-streak detection (≥3 consecutive A-grade years), and career phase. Runs via `aiwg corpus profile-temporal`.