Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a17-behaviors.skill

new-a17-behavior is a small scaffolding skill for starting a new @area17/a17-behaviors behavior inside an existing app.

It does the repetitive setup work:

  • finds the app's existing behaviors directory
  • creates a new behavior file
  • updates the local index.js export
  • mirrors local conventions such as export casing, quote style, semicolons, indentation, and .js extension usage
  • preserves alphabetical ordering in index.js when that file is already ordered that way

It is intentionally narrow. It helps start a new behavior in an app that already has a behaviors folder and index.js. It does not create a new behaviors system from scratch.

Codex

Use the skill by name:

Use $new-a17-behavior to scaffold a new behavior called showAlert in this app.

If you do not provide a behavior name, the skill is written to ask for one before making changes.

Typical prompts:

Use $new-a17-behavior to scaffold a new behavior called openModal in this app.
Use $new-a17-behavior to start a new a17 behavior called stickyHeader in this repo.

Claude

Claude-facing workflow lives in CLAUDE.md. Prompt Claude directly, for example:

Start a new a17 behavior called showAlert in this app. Follow CLAUDE.md.
Create a new a17 behavior called openAccordion in this repo and use the workflow in CLAUDE.md.

Helper Script

The skill uses:

scripts/scaffold_behavior.py

That script can also be run directly:

python3 scripts/scaffold_behavior.py /path/to/app showAlert --dry-run
python3 scripts/scaffold_behavior.py /path/to/app showAlert

The dry run previews the target directory, the new file, and the export line before writing anything.

App Shape

The skill attempts to find a location for behaviors by guessing file structures like:

  • js/behaviors
  • src/js/behaviors
  • frontend/scripts/behaviors
  • resources/frontend/scripts/behaviors
  • scripts/behaviors

(If the project does not already have a behaviors directory and index.js, the skill will stop and ask what to do)

About

`new-a17-behavior` is a small scaffolding skill for starting a new `@area17/a17-behaviors` behavior inside an existing app.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages