Skill
Through Skill, you can easily extend Hawa Code’s capabilities. Users can achieve various vertical scenario functionalities without developing an Agent.
Skill Structure
excel/ |
Skill Example
--- |
Skill Installation
Copy the Skill to the following installation directory, restart Hawa Code to take effect:
- ~/.hcode/skills (This directory is for user configuration, effective for all projects)
- {project directory}/.hcode/skills (This directory is for project configuration, only effective for the current project)
Frontmatter Reference
The frontmatter at the top of SKILL.md is used to manage Skill behavior
| Field | Description |
|---|---|
| name | Skill name |
| description | Hawa Code uses this description to determine when to load this Skill |
| allowed-tools | Tools that the Skill can use directly after being loaded, without user confirmation |
| context | When set to fork, this Skill runs in an isolated sub-agent context |
| agent | When context: fork, select the sub-agent type (e.g., Explore, Plan) |
| disable-model-invocation | Defaults to false, if set to true, this skill cannot be invoked by the model |
| user-invocable | Defaults to true, if set to false, this skill cannot be invoked via slash commands |
Dynamic Shell Commands
Use !command`` shell placeholders in Skills. Hawa Code will execute the shell command, replace the original content, and then send it to the model.
--- |
String Substitution
Skills support dynamic value string substitution in skill content:
| Variable | Description |
|---|---|
| $ARGUMENTS | All arguments passed when invoking the skill. If $ARGUMENTS is not in the content, arguments are appended as ARGUMENTS: |
| $ARGUMENTS[N] | Access specific arguments by 0-based index, e.g., $ARGUMENTS[0] represents the first argument. |
| $N | Shorthand for $ARGUMENTS[N], e.g., $0 represents the first argument or $1 represents the second argument. |
| ${HCODE_SESSION_ID} | Current session ID. Used for logging, creating session-specific files, or associating skill output with a session. |
| ${HCODE_SKILL_DIR} | The directory containing the skill’s SKILL.md file. For plugin skills, this is the skill subdirectory within the plugin, not the plugin root. Use it in bash injection commands to reference scripts or files bundled with the skill, regardless of current working directory. |