Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Setup mise
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac
- name: Run CI
run: mise run ci
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.DS_Store
dist/
14 changes: 14 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tools]
bun = "1.2.17"

[tasks.dev]
run = "bun src/cli.ts"

[tasks.install]
run = "bun install"

[tasks.test]
run = "mise run install && bunx vitest run"

[tasks.ci]
run = "mise run test"
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# AGENTS

- Use mise for running tasks and managing tool versions (see `.mise.toml`).
- Install dependencies with `mise run install`.
- Run the CLI in development with `mise run dev`.
- Run tests and CI with `mise run test` and `mise run ci`.
- Keep dependencies lightweight; avoid bloated CLI frameworks.
- Lockfile format is YAML (`skillet.lock.yaml`).
- Keep instructions concise and update this file when workflows change.
262 changes: 262 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "skillet",
"version": "0.0.0",
"private": true,
"type": "module",
"bin": {
"skillet": "src/cli.ts"
},
"scripts": {
"dev": "bun src/cli.ts",
"test": "vitest run"
},
"dependencies": {
"cac": "^6.7.14",
"yaml": "^2.5.0"
},
"devDependencies": {
"vitest": "^1.6.0"
}
}
53 changes: 53 additions & 0 deletions skills/claude-complex-tasks/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: claude-complex-tasks
description: Guide Claude on complex, multi-step tasks by enforcing structured discovery, scoped planning, and verification before delivery.
compatibility: Designed for Claude Code and similar agents.
---

# Claude Complex Tasks

Use this skill when the task is complex, multi-step, or ambiguous and needs careful planning, validation, or staged delivery.

## When to Use

- The request spans multiple subsystems or files.
- The outcome depends on external constraints (CI, build, integrations).
- The task is risky, irreversible, or requires high accuracy.

## Approach

1. **Clarify scope**
- Restate the goal in one sentence.
- List assumptions and missing inputs.
- Ask only one focused question if blocked.

2. **Plan the work**
- Break into 3-7 steps with clear outcomes.
- Identify dependencies (tools, files, environment).
- Decide what can be done in parallel.

3. **Gather context**
- Locate relevant files and read them first.
- Verify conventions and existing patterns.
- Identify edge cases and constraints.

4. **Execute in stages**
- Make smallest safe change to prove direction.
- Iterate with tests or quick checks.
- Keep changes scoped to the request.

5. **Verify**
- Run requested tests or minimal validation.
- Confirm behavior against acceptance criteria.
- Note any remaining risks.

6. **Report**
- Summarize what changed and where.
- Call out any decisions or tradeoffs.
- Suggest next steps if needed.

## Output Expectations

- Prefer concise, structured updates.
- Avoid long dumps of code; reference files instead.
- Keep decisions explicit and traceable.
80 changes: 80 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/usr/bin/env bun
import { cac } from "cac";

const COMMANDS = ["add", "find", "check", "update", "init", "generate-lock"] as const;
type CommandName = (typeof COMMANDS)[number];

type GlobalFlags = {
yes: boolean;
verbose: boolean;
};

type CommandOptions = {
yes?: boolean;
verbose?: boolean;
};

declare const SKILLET_VERSION: string | undefined;

const VERSION =
typeof SKILLET_VERSION === "string" && SKILLET_VERSION.length > 0
? SKILLET_VERSION
: process.env.SKILLET_VERSION ?? "dev";

const COMMAND_HELP: Record<CommandName, string> = {
add: "Install skills from a source",
find: "Search available skills",
check: "Check for updates to installed skills",
update: "Update installed skills",
init: "Create a SKILL.md template",
"generate-lock": "Generate skillet.lock.yaml",
};

const cli = cac("skillet");

cli
.option("-y, --yes", "Skip confirmations")
.option("--verbose", "Enable verbose output")
.version(VERSION, "-v, --version")
.help();

function toGlobalFlags(options: CommandOptions): GlobalFlags {
return {
yes: Boolean(options.yes),
verbose: Boolean(options.verbose),
};
}

function runCommand(command: CommandName, args: string[], flags: GlobalFlags): number {
if (flags.verbose) {
console.error(`Running ${command} with args: ${args.join(" ")}`);
}

console.error(`Command "${command}" is not implemented yet.`);
return 2;
}

function addCommand(command: CommandName): void {
cli
.command(`${command} [...args]`, COMMAND_HELP[command])
.action((args: string[], options: CommandOptions) => {
const exitCode = runCommand(command, args, toGlobalFlags(options));
process.exitCode = exitCode;
});
}

for (const command of COMMANDS) {
addCommand(command);
}

cli.on("command:*", (commands) => {
console.error(`Unknown command: ${commands.join(" ")}`);
cli.outputHelp();
process.exit(1);
});

if (process.argv.length <= 2) {
cli.outputHelp();
} else {
cli.parse();
}
Loading