You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@howaboua/opencode-workflows-tool

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@howaboua/opencode-workflows-tool - npm Package Compare versions

Comparing version
0.0.5
to
0.0.6
+3
dist/skills/bundled.d.ts
import type { Hooks } from "@opencode-ai/plugin";
export declare const createBundledSkillsHook: () => Pick<Hooks, "config">;
//# sourceMappingURL=bundled.d.ts.map
{"version":3,"file":"bundled.d.ts","sourceRoot":"","sources":["../../src/skills/bundled.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAgDhD,eAAO,MAAM,uBAAuB,QAAO,IAAI,CAAC,KAAK,EAAE,QAAQ,CAO9D,CAAA"}
export { createBundledSkillsHook } from "./bundled";
//# sourceMappingURL=index.d.ts.map
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA"}
---
name: workflows
description: |-
Load and create repository SOPs via `workflows` and `workflows_create` tools. Use proactively when executing repo-specific procedures, documenting repeatable processes, or when `<available_workflows>` contains matching entries.
Examples:
- user: "Release a new version" -> check available_workflows, load matching SOP, follow steps
- user: "How do we deploy?" -> call workflows to list, load relevant procedure
- user: "Document this process" -> use workflows_create to capture the SOP
- user: "Create a migration workflow" -> use workflows_create with structured body
- user: "Don't make the same mistake again" -> use workflows_create to the correct workflow
---
# Workflows
<objective>
Follow established SOPs before executing repo-specific procedures. Capture repeatable processes as workflows for future reuse.
</objective>
<procedure name="before-repo-work">
## Before Executing Repo-Specific Procedures
1. Check `<available_workflows>` in the system prompt
2. If a matching workflow exists, call `workflows` with that name
3. Follow the returned procedure step-by-step
4. If you must adapt steps, explain why the deviation is safe
</procedure>
<procedure name="after-completing-process">
## After Completing a Reusable Process
1. Identify if the process could be repeated (deployments, migrations, releases, etc.)
2. Structure what you learned:
- **Prerequisites**: What must be true before starting
- **Steps**: Numbered, with exact commands
- **Verification**: How to confirm success
- **Troubleshooting**: What can fail and how to recover
3. Call `workflows_create` with:
- `name`: Descriptive identifier
- `description`: 5-10 word summary
- `body`: Markdown with the structured content above
</procedure>
<procedure name="correcting-workflows">
## When a Workflow Doesn't Match Reality
If a loaded workflow doesn't match your experience or you discover a new edge case:
1. Read the workflow file at `.opencode/workflows/<name>/WORKFLOW.md`
2. Use the Edit tool to surgically update the workflow:
- Add missing steps or prerequisites
- Correct inaccurate commands or outputs
- Document the new edge case in Troubleshooting
3. Keep changes minimal and focused on what you learned
Do NOT create duplicate workflows. Always update the existing one.
</procedure>
<rules>
- MUST check `<available_workflows>` before repo-specific procedures
- MUST load workflow when a matching entry exists
- MUST create workflow after completing a reusable process
- MUST use Edit tool on `.opencode/workflows/*/WORKFLOW.md` to correct inaccuracies or add edge cases
- MUST update existing workflows rather than creating variants
- SHOULD include exact commands and expected outputs in steps
- SHOULD document failure scenarios and recovery steps
- MAY add workflow references to nested `AGENTS.md` for directory-specific suggestions
</rules>
---
name: workflows
description: |-
Load and create repository SOPs via `workflows` and `workflows_create` tools. Use proactively when executing repo-specific procedures, documenting repeatable processes, or when `<available_workflows>` contains matching entries.
Examples:
- user: "Release a new version" -> check available_workflows, load matching SOP, follow steps
- user: "How do we deploy?" -> call workflows to list, load relevant procedure
- user: "Document this process" -> use workflows_create to capture the SOP
- user: "Create a migration workflow" -> use workflows_create with structured body
- user: "Don't make the same mistake again" -> use workflows_create to the correct workflow
---
# Workflows
<objective>
Follow established SOPs before executing repo-specific procedures. Capture repeatable processes as workflows for future reuse.
</objective>
<procedure name="before-repo-work">
## Before Executing Repo-Specific Procedures
1. Check `<available_workflows>` in the system prompt
2. If a matching workflow exists, call `workflows` with that name
3. Follow the returned procedure step-by-step
4. If you must adapt steps, explain why the deviation is safe
</procedure>
<procedure name="after-completing-process">
## After Completing a Reusable Process
1. Identify if the process could be repeated (deployments, migrations, releases, etc.)
2. Structure what you learned:
- **Prerequisites**: What must be true before starting
- **Steps**: Numbered, with exact commands
- **Verification**: How to confirm success
- **Troubleshooting**: What can fail and how to recover
3. Call `workflows_create` with:
- `name`: Descriptive identifier
- `description`: 5-10 word summary
- `body`: Markdown with the structured content above
</procedure>
<procedure name="correcting-workflows">
## When a Workflow Doesn't Match Reality
If a loaded workflow doesn't match your experience or you discover a new edge case:
1. Read the workflow file at `.opencode/workflows/<name>/WORKFLOW.md`
2. Use the Edit tool to surgically update the workflow:
- Add missing steps or prerequisites
- Correct inaccurate commands or outputs
- Document the new edge case in Troubleshooting
3. Keep changes minimal and focused on what you learned
Do NOT create duplicate workflows. Always update the existing one.
</procedure>
<rules>
- MUST check `<available_workflows>` before repo-specific procedures
- MUST load workflow when a matching entry exists
- MUST create workflow after completing a reusable process
- MUST use Edit tool on `.opencode/workflows/*/WORKFLOW.md` to correct inaccuracies or add edge cases
- MUST update existing workflows rather than creating variants
- SHOULD include exact commands and expected outputs in steps
- SHOULD document failure scenarios and recovery steps
- MAY add workflow references to nested `AGENTS.md` for directory-specific suggestions
</rules>
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAIjD,eAAO,MAAM,uBAAuB,EAAE,MAcrC,CAAA;AAED,eAAe,uBAAuB,CAAA"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAS,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAKxD,eAAO,MAAM,uBAAuB,EAAE,MAoBrC,CAAA;AAED,eAAe,uBAAuB,CAAA"}
export declare const buildWorkflowToolDescription: () => string;
export declare const buildWorkflowCreateDescription: () => string;
export declare const buildWorkflowLearnDescription: () => string;
//# sourceMappingURL=description.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../src/workflows/description.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B,cAMxC,CAAC;AAEF,eAAO,MAAM,8BAA8B,cAS1C,CAAC"}
{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../src/workflows/description.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B,cAMxC,CAAC;AAEF,eAAO,MAAM,8BAA8B,cAS1C,CAAC;AAEF,eAAO,MAAM,6BAA6B,cAMzC,CAAC"}

@@ -1,2 +0,2 @@

export declare const WORKFLOW_COMMAND_INSTRUCTIONS = "\n<summary>\nDocument this session as a workflow and enforce its usage via AGENTS.md.\n</summary>\n\n<objective>\nCapture session findings into a repeatable workflow (via workflows_create) and ensure it is suggested to future agents operating in this scope via AGENTS.md.\n</objective>\n\n<instructions>\n1. **Document Session**: Analyze what was done, what worked, and what to avoid. Use `workflows_create` to save this as a new workflow or update an existing one.\n2. **Auto-Detect Scope**: Prefer creating/editing a nested `AGENTS.md` in the specific subdirectory where work occurred (OpenCode auto-loads these when entering subdirs). Use the root only for global procedures.\n3. **Format Rule**: Add/append exactly: \"When operating in this directory you MUST consider loading these workflows:\" followed by a concise list of relevant workflow names.\n</instructions>\n\n<rules>\n- MUST use `workflows_create` to persist the session's logic.\n- MUST use the exact phrasing: \"When operating in this directory you MUST consider loading these workflows:\".\n- MUST keep `AGENTS.md` updates minimalist and focused.\n</rules>\n";
export declare const WORKFLOW_COMMAND_INSTRUCTIONS = "\n<summary>\nDocument this session as a workflow and enforce its usage via AGENTS.md.\n</summary>\n\n<objective>\nCapture session findings into a repeatable workflow (via workflows_create) and ensure it is suggested to future agents operating in this scope via AGENTS.md.\n</objective>\n\n<instructions>\n1. **Load Workflows Skill**: Use the skill tool to load the `workflows` skill before continuing.\n2. **Document Session**: Analyze what was done, what worked, and what to avoid. Use `workflows_create` to save this as a new workflow or update an existing one.\n3. **Auto-Detect Scope**: Prefer creating/editing a nested `AGENTS.md` in the specific subdirectory where work occurred (OpenCode auto-loads these when entering subdirs). Use the root only for global procedures.\n4. **Format Rule**: Add/append exactly: \"When operating in this directory you MUST consider loading these workflows:\" followed by a concise list of relevant workflow names.\n</instructions>\n\n<rules>\n- MUST use `workflows_create` to persist the session's logic.\n- MUST use the exact phrasing: \"When operating in this directory you MUST consider loading these workflows:\".\n- MUST keep `AGENTS.md` updates minimalist and focused.\n</rules>\n";
//# sourceMappingURL=instructions.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/workflows/instructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,4mCAoBzC,CAAC"}
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/workflows/instructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,8sCAqBzC,CAAC"}
{
"name": "@howaboua/opencode-workflows-tool",
"version": "0.0.5",
"version": "0.0.6",
"description": "Enhanced skill tool plugin for OpenCode - 1:1 clone of built-in skill tool with extensibility",

@@ -16,2 +16,3 @@ "type": "module",

"dist",
"skills",
"README.md",

@@ -21,3 +22,3 @@ "LICENSE"

"scripts": {
"build": "bun build src/index.ts --outdir dist --target bun --sourcemap && tsc --emitDeclarationOnly",
"build": "echo '[build] Note: cp -r requires Unix (Linux/macOS)' && bun build src/index.ts --outdir dist --target bun --sourcemap && tsc --emitDeclarationOnly && cp -r skills dist/",
"dev": "bun --watch src/index.ts",

@@ -24,0 +25,0 @@ "prepublishOnly": "bun run build",

@@ -11,2 +11,3 @@ # Opencode Workflows Tool (aka skills but better)

- **Bundled Skill**: Ships with a `workflows` skill that teaches agents when and how to use workflows effectively
- **Slash Command**: `/workflow` to automatically document a session as an SOP and associate it with a directory via `AGENTS.md`

@@ -76,3 +77,3 @@ - **Tools exposed**: `workflows` and `workflows_create` for listing, loading, and creating SOPs

# Build
# Build (Linux/macOS only)
bun run build

@@ -79,0 +80,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display