agentic-toolbox 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +242 -0
- package/LICENSE +21 -0
- package/README.md +326 -0
- package/agents/Agent.md.sample +384 -0
- package/agents/agentic-tools-creator.md +143 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +74 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +40 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +36 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/sync.d.ts +13 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +75 -0
- package/dist/sync.js.map +1 -0
- package/dist/transform.d.ts +2 -0
- package/dist/transform.d.ts.map +1 -0
- package/dist/transform.js +42 -0
- package/dist/transform.js.map +1 -0
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +55 -0
- package/skills/SKILL.md.sample +322 -0
- package/skills/agent-creator/SKILL.md +110 -0
- package/skills/agent-creator/assets/examples/code-reviewer.md +68 -0
- package/skills/agent-creator/assets/examples/docs-writer.md +67 -0
- package/skills/agent-creator/assets/examples/read-only-researcher.md +64 -0
- package/skills/agent-creator/references/AGENT_TEMPLATE.md +391 -0
- package/skills/agent-creator/references/frontmatter.md +544 -0
- package/skills/agent-creator/references/prompt.md +449 -0
- package/skills/agent-creator/references/validation.md +309 -0
- package/skills/agentic-resource-gatherer/SKILL.md +249 -0
- package/skills/agentic-resource-gatherer/assets/examples/frontend-developer-agent.md +52 -0
- package/skills/agentic-resource-gatherer/assets/examples/git-formatter-skill.md +52 -0
- package/skills/agentic-resource-gatherer/references/agent-repos.md +190 -0
- package/skills/agentic-resource-gatherer/references/skill-repos.md +225 -0
- package/skills/skill-creator/SKILL.md +178 -0
- package/skills/skill-creator/assets/examples/background-knowledge-skill.md +25 -0
- package/skills/skill-creator/assets/examples/code-generation-skill.md +51 -0
- package/skills/skill-creator/assets/examples/simple-git-skill.md +36 -0
- package/skills/skill-creator/references/SKILL_TEMPLATE.md +322 -0
- package/skills/skill-creator/references/frontmatter.md +441 -0
- package/skills/skill-creator/references/prompt.md +384 -0
- package/skills/skill-creator/references/validation.md +282 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ToolMap, StripFields } from './types.js';
|
|
2
|
+
export declare const TOOL_MAP: ToolMap;
|
|
3
|
+
export declare const STRIP_FIELDS: StripFields;
|
|
4
|
+
export declare const DEFAULT_CONFIG_NAME = "agentic-toolkit.json";
|
|
5
|
+
export declare const FRONTMATTER_REGEX: RegExp;
|
|
6
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,OAIb,CAAC;AAEX,eAAO,MAAM,YAAY,EAAE,WA2BjB,CAAC;AAEX,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,eAAO,MAAM,iBAAiB,QAA8B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const TOOL_MAP = {
|
|
2
|
+
opencode: '.opencode',
|
|
3
|
+
claude: '.claude',
|
|
4
|
+
agents: '.agents',
|
|
5
|
+
};
|
|
6
|
+
export const STRIP_FIELDS = {
|
|
7
|
+
opencode: [
|
|
8
|
+
'tools',
|
|
9
|
+
'disallowedTools',
|
|
10
|
+
'permissionMode',
|
|
11
|
+
'maxTurns',
|
|
12
|
+
'skills',
|
|
13
|
+
'mcpServers',
|
|
14
|
+
'hooks',
|
|
15
|
+
'memory',
|
|
16
|
+
'background',
|
|
17
|
+
'effort',
|
|
18
|
+
'isolation',
|
|
19
|
+
'initialPrompt',
|
|
20
|
+
],
|
|
21
|
+
claude: [
|
|
22
|
+
'permission',
|
|
23
|
+
'mode',
|
|
24
|
+
'temperature',
|
|
25
|
+
'steps',
|
|
26
|
+
'disable',
|
|
27
|
+
'prompt',
|
|
28
|
+
'hidden',
|
|
29
|
+
'top_p',
|
|
30
|
+
'reasoningEffort',
|
|
31
|
+
'textVerbosity',
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
export const DEFAULT_CONFIG_NAME = 'agentic-toolkit.json';
|
|
35
|
+
export const FRONTMATTER_REGEX = /^(---\n)([\s\S]*?)(\n---)/;
|
|
36
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAY;IAC/B,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,QAAQ,EAAE;QACR,OAAO;QACP,iBAAiB;QACjB,gBAAgB;QAChB,UAAU;QACV,QAAQ;QACR,YAAY;QACZ,OAAO;QACP,QAAQ;QACR,YAAY;QACZ,QAAQ;QACR,WAAW;QACX,eAAe;KAChB;IACD,MAAM,EAAE;QACN,YAAY;QACZ,MAAM;QACN,aAAa;QACb,OAAO;QACP,SAAS;QACT,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,iBAAiB;QACjB,eAAe;KAChB;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,2BAA2B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/sync.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AgenticToolkitConfig } from './types.js';
|
|
2
|
+
interface SyncOptions {
|
|
3
|
+
config: AgenticToolkitConfig;
|
|
4
|
+
dryRun?: boolean;
|
|
5
|
+
verbose?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function syncToTarget(target: 'opencode' | 'claude' | 'agents', options: SyncOptions): {
|
|
8
|
+
success: boolean;
|
|
9
|
+
message?: string;
|
|
10
|
+
error?: Error;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,UAAU,WAAW;IACnB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAQD,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,EAAE,OAAO,EAAE,WAAW,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAwElJ"}
|
package/dist/sync.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { getParentProjectRoot, getSubmoduleDir } from './config.js';
|
|
4
|
+
import { TOOL_MAP } from './constants.js';
|
|
5
|
+
import { transformAgentContent } from './transform.js';
|
|
6
|
+
function log(message, verbose = false) {
|
|
7
|
+
if (verbose) {
|
|
8
|
+
console.log(message);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export function syncToTarget(target, options) {
|
|
12
|
+
const parentProjectRoot = getParentProjectRoot();
|
|
13
|
+
const submoduleDir = getSubmoduleDir();
|
|
14
|
+
const targetDir = path.join(parentProjectRoot, TOOL_MAP[target]);
|
|
15
|
+
log(` Syncing to ${TOOL_MAP[target]}...`, options.verbose);
|
|
16
|
+
try {
|
|
17
|
+
if (!options.dryRun) {
|
|
18
|
+
if (fs.existsSync(targetDir)) {
|
|
19
|
+
fs.rmSync(targetDir, { recursive: true, force: true });
|
|
20
|
+
}
|
|
21
|
+
fs.mkdirSync(path.join(targetDir, 'agents'), { recursive: true });
|
|
22
|
+
fs.mkdirSync(path.join(targetDir, 'skills'), { recursive: true });
|
|
23
|
+
}
|
|
24
|
+
const submoduleAgents = path.join(submoduleDir, '..', 'agents');
|
|
25
|
+
const submoduleSkills = path.join(submoduleDir, '..', 'skills');
|
|
26
|
+
// Also check project-level agents/skills
|
|
27
|
+
const projectAgents = path.join(parentProjectRoot, 'agents');
|
|
28
|
+
const projectSkills = path.join(parentProjectRoot, 'skills');
|
|
29
|
+
// Sync agents with transformation
|
|
30
|
+
if (!options.dryRun) {
|
|
31
|
+
// First sync package agents
|
|
32
|
+
if (fs.existsSync(submoduleAgents)) {
|
|
33
|
+
const agentFiles = fs.readdirSync(submoduleAgents).filter(f => f.endsWith('.md'));
|
|
34
|
+
for (const file of agentFiles) {
|
|
35
|
+
const srcPath = path.join(submoduleAgents, file);
|
|
36
|
+
const destPath = path.join(targetDir, 'agents', file);
|
|
37
|
+
const content = fs.readFileSync(srcPath, 'utf8');
|
|
38
|
+
const transformed = transformAgentContent(content, target);
|
|
39
|
+
fs.writeFileSync(destPath, transformed);
|
|
40
|
+
log(` Copied agent: ${file}`, options.verbose);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Then merge project agents (overwrites package agents with same name)
|
|
44
|
+
if (fs.existsSync(projectAgents)) {
|
|
45
|
+
const agentFiles = fs.readdirSync(projectAgents).filter(f => f.endsWith('.md'));
|
|
46
|
+
for (const file of agentFiles) {
|
|
47
|
+
const srcPath = path.join(projectAgents, file);
|
|
48
|
+
const destPath = path.join(targetDir, 'agents', file);
|
|
49
|
+
const content = fs.readFileSync(srcPath, 'utf8');
|
|
50
|
+
const transformed = transformAgentContent(content, target);
|
|
51
|
+
fs.writeFileSync(destPath, transformed);
|
|
52
|
+
log(` Merged project agent: ${file}`, options.verbose);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Sync skills (no transformation needed)
|
|
57
|
+
if (!options.dryRun) {
|
|
58
|
+
// First sync package skills
|
|
59
|
+
if (fs.existsSync(submoduleSkills)) {
|
|
60
|
+
fs.cpSync(submoduleSkills, path.join(targetDir, 'skills'), { recursive: true });
|
|
61
|
+
log(` Copied skills from package`, options.verbose);
|
|
62
|
+
}
|
|
63
|
+
// Then merge project skills
|
|
64
|
+
if (fs.existsSync(projectSkills)) {
|
|
65
|
+
fs.cpSync(projectSkills, path.join(targetDir, 'skills'), { recursive: true });
|
|
66
|
+
log(` Merged project skills`, options.verbose);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return { success: true, message: `Synced to ${TOOL_MAP[target]}` };
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return { success: false, error: error, message: `Failed to sync to ${TOOL_MAP[target]}` };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=sync.js.map
|
package/dist/sync.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AASvD,SAAS,GAAG,CAAC,OAAe,EAAE,UAAmB,KAAK;IACpD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAwC,EAAE,OAAoB;IACzF,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IACjD,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAEjE,GAAG,CAAC,gBAAgB,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5D,IAAI,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC7B,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAA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CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAChF,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACzD,CAAC;YAED,4BAA4B;YAC5B,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;gBACjC,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC9E,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;IACrE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAc,EAAE,OAAO,EAAE,qBAAqB,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;IACrG,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CA2CvG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { STRIP_FIELDS, FRONTMATTER_REGEX } from './constants.js';
|
|
2
|
+
export function transformAgentContent(content, target) {
|
|
3
|
+
const fieldsToStrip = STRIP_FIELDS[target];
|
|
4
|
+
if (!fieldsToStrip || fieldsToStrip.length === 0)
|
|
5
|
+
return content;
|
|
6
|
+
const match = content.match(FRONTMATTER_REGEX);
|
|
7
|
+
if (!match)
|
|
8
|
+
return content;
|
|
9
|
+
const [, opening, frontmatter, closing] = match;
|
|
10
|
+
const lines = frontmatter.split('\n');
|
|
11
|
+
const transformedLines = [];
|
|
12
|
+
let skipBlock = false;
|
|
13
|
+
let indent = 0;
|
|
14
|
+
for (let i = 0; i < lines.length; i++) {
|
|
15
|
+
const line = lines[i];
|
|
16
|
+
const fieldMatch = line.match(/^(\s*)(\w[\w-]*):/);
|
|
17
|
+
if (fieldMatch) {
|
|
18
|
+
const currentIndent = fieldMatch[1].length;
|
|
19
|
+
const fieldName = fieldMatch[2];
|
|
20
|
+
if (skipBlock) {
|
|
21
|
+
if (currentIndent <= indent) {
|
|
22
|
+
skipBlock = false;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (fieldsToStrip.includes(fieldName)) {
|
|
29
|
+
skipBlock = true;
|
|
30
|
+
indent = currentIndent;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else if (skipBlock) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
transformedLines.push(line);
|
|
38
|
+
}
|
|
39
|
+
const transformedFrontmatter = transformedLines.join('\n');
|
|
40
|
+
return content.replace(FRONTMATTER_REGEX, `${opening}${transformedFrontmatter}${closing}`);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,UAAU,qBAAqB,CAAC,OAAe,EAAE,MAAwC;IAC7F,MAAM,aAAa,GAAG,YAAY,CAAC,MAAmC,CAAC,CAAC;IACxE,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAA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GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,OAAO,GAAG,sBAAsB,GAAG,OAAO,EAAE,CAAC,CAAC;AAC7F,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ToolMap {
|
|
2
|
+
opencode: string;
|
|
3
|
+
claude: string;
|
|
4
|
+
agents: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StripFields {
|
|
7
|
+
opencode: string[];
|
|
8
|
+
claude: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface AgenticToolkitConfig {
|
|
11
|
+
targets: ('opencode' | 'claude' | 'agents')[];
|
|
12
|
+
}
|
|
13
|
+
export interface CliOptions {
|
|
14
|
+
configPath?: string;
|
|
15
|
+
dryRun: boolean;
|
|
16
|
+
verbose: boolean;
|
|
17
|
+
help: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface SyncResult {
|
|
20
|
+
target: string;
|
|
21
|
+
success: boolean;
|
|
22
|
+
message?: string;
|
|
23
|
+
error?: Error;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,CAAC,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentic-toolbox",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Cross-platform AI agent & skill sync engine for Claude Code and OpenCode",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"agentic-toolkit": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/",
|
|
19
|
+
"AGENTS.md",
|
|
20
|
+
"README.md",
|
|
21
|
+
"agents/",
|
|
22
|
+
"skills/"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"dev": "tsc --watch",
|
|
27
|
+
"clean": "rm -rf dist",
|
|
28
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
29
|
+
"test": "echo \"No tests yet\" && exit 0"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/ritesh-jain/agentic-toolkit.git"
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/ritesh-jain/agentic-toolkit/issues"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/ritesh-jain/agentic-toolkit#readme",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"keywords": [
|
|
41
|
+
"ai",
|
|
42
|
+
"agents",
|
|
43
|
+
"skills",
|
|
44
|
+
"claude",
|
|
45
|
+
"opencode",
|
|
46
|
+
"sync"
|
|
47
|
+
],
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"typescript": "^5.4.0",
|
|
53
|
+
"@types/node": "^20.11.0"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# [Skill Name]
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
7
|
+
# CROSS-PLATFORM FIELDS (Supported by both Claude and OpenCode)
|
|
8
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
9
|
+
|
|
10
|
+
name: skill-name # Both: Skill identifier.
|
|
11
|
+
# Claude: Optional, defaults to directory name.
|
|
12
|
+
# OpenCode: Required. Lowercase alphanumeric with
|
|
13
|
+
# single hyphen separators. 1-64 chars. Must
|
|
14
|
+
# match directory name.
|
|
15
|
+
|
|
16
|
+
description: > # Both: Recommended. What the skill does and when to use it.
|
|
17
|
+
# Claude: Used to decide when to load automatically.
|
|
18
|
+
# OpenCode: Required. 1-1024 characters.
|
|
19
|
+
# Must include: what it does, when to invoke,
|
|
20
|
+
# what NOT to use it for, what it returns.
|
|
21
|
+
Summarizes uncommitted changes and flags anything risky. Use when the
|
|
22
|
+
user asks what changed, wants a commit message, or asks to review their
|
|
23
|
+
diff. Do not use for committed history analysis, comparing branches, or
|
|
24
|
+
generating changelogs for releases. Returns a structured summary with
|
|
25
|
+
change categories, risk assessment, and specific file references.
|
|
26
|
+
|
|
27
|
+
license: MIT # Both: Optional. License covering the skill.
|
|
28
|
+
|
|
29
|
+
compatibility: [platform] # Both: Optional. Environment requirements.
|
|
30
|
+
# Claude: String up to 500 characters.
|
|
31
|
+
# OpenCode: String.
|
|
32
|
+
|
|
33
|
+
metadata: # Both: Optional. Free-form key-value data.
|
|
34
|
+
audience: [e.g., developers] # Claude: Must be a YAML map.
|
|
35
|
+
workflow: [e.g., github] # OpenCode: Must be string-to-string map.
|
|
36
|
+
|
|
37
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
38
|
+
# CLAUDE-SPECIFIC FIELDS
|
|
39
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
40
|
+
|
|
41
|
+
when_to_use: > # Claude: Optional. Additional trigger context.
|
|
42
|
+
# Appended to description in skill listing.
|
|
43
|
+
# Truncated at 1,536 chars combined with description.
|
|
44
|
+
[Additional context for when Claude should invoke this skill]
|
|
45
|
+
|
|
46
|
+
argument-hint: "[arg1] [arg2]" # Claude: Optional. Hint shown during autocomplete.
|
|
47
|
+
|
|
48
|
+
arguments: # Claude: Optional. Named positional arguments.
|
|
49
|
+
- arg1 # Space-separated string or YAML list.
|
|
50
|
+
- arg2 # Names map to $arg1, $arg2 in content.
|
|
51
|
+
|
|
52
|
+
disable-model-invocation: false # Claude: Optional. Prevent Claude from auto-loading.
|
|
53
|
+
# true = Only user can invoke with /skill-name
|
|
54
|
+
# false = Both user and Claude can invoke
|
|
55
|
+
|
|
56
|
+
user-invocable: true # Claude: Optional. Hide from / menu.
|
|
57
|
+
# true = User can invoke
|
|
58
|
+
# false = Only Claude can invoke (background knowledge)
|
|
59
|
+
|
|
60
|
+
allowed-tools: Read, Grep # Claude: Optional. Tools allowed without permission.
|
|
61
|
+
# Space or comma-separated, or YAML list.
|
|
62
|
+
# Grant clears on next message.
|
|
63
|
+
|
|
64
|
+
disallowed-tools: Write, Edit # Claude: Optional. Tools removed while skill is active.
|
|
65
|
+
# Space or comma-separated, or YAML list.
|
|
66
|
+
|
|
67
|
+
model: inherit # Claude: Optional. Model override for this skill.
|
|
68
|
+
# Values: sonnet | opus | haiku | inherit | full-model-id
|
|
69
|
+
# Override applies for rest of current turn.
|
|
70
|
+
|
|
71
|
+
effort: high # Claude: Optional. Effort level override.
|
|
72
|
+
# Values: low | medium | high | xhigh | max
|
|
73
|
+
|
|
74
|
+
context: fork # Claude: Optional. Run in forked subagent context.
|
|
75
|
+
# fork = Run in separate subagent
|
|
76
|
+
|
|
77
|
+
agent: general # Claude: Optional. Which subagent type to use.
|
|
78
|
+
# Only applies with context: fork
|
|
79
|
+
|
|
80
|
+
background: true # Claude: Optional. Only with context: fork.
|
|
81
|
+
# true = Run in background
|
|
82
|
+
# false = Wait for result
|
|
83
|
+
|
|
84
|
+
hooks: # Claude: Optional. Lifecycle hooks.
|
|
85
|
+
PreToolUse:
|
|
86
|
+
- matcher: "Bash"
|
|
87
|
+
hooks:
|
|
88
|
+
- type: command
|
|
89
|
+
command: "echo 'Running skill'"
|
|
90
|
+
|
|
91
|
+
paths: "src/**/*.ts, lib/**/*.js" # Claude: Optional. Glob patterns for activation.
|
|
92
|
+
# Skill loads only when working with matching files.
|
|
93
|
+
|
|
94
|
+
shell: bash # Claude: Optional. Shell for inline commands.
|
|
95
|
+
# Values: bash | powershell
|
|
96
|
+
|
|
97
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
98
|
+
# DYNAMIC CONTEXT (Claude Only)
|
|
99
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
100
|
+
# Use !`command` to inject shell output into the skill content.
|
|
101
|
+
# Claude runs the command and replaces the line with its output.
|
|
102
|
+
#
|
|
103
|
+
# Example:
|
|
104
|
+
# !`git diff HEAD`
|
|
105
|
+
# !`ls -la src/`
|
|
106
|
+
#
|
|
107
|
+
# String Substitutions (Claude Only):
|
|
108
|
+
# $ARGUMENTS - All arguments passed when invoking
|
|
109
|
+
# $0, $1, $2 - Specific arguments by index
|
|
110
|
+
# $name - Named argument from arguments field
|
|
111
|
+
# ${CLAUDE_SESSION_ID} - Current session ID
|
|
112
|
+
# ${CLAUDE_EFFORT} - Current effort level
|
|
113
|
+
# ${CLAUDE_SKILL_DIR} - Directory containing this SKILL.md
|
|
114
|
+
# ${CLAUDE_PROJECT_DIR} - Project root directory
|
|
115
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## What I Do
|
|
119
|
+
|
|
120
|
+
[Clear, concise description of the skill's purpose]
|
|
121
|
+
|
|
122
|
+
## When to Use Me
|
|
123
|
+
|
|
124
|
+
[Specific trigger conditions and use cases]
|
|
125
|
+
|
|
126
|
+
## Instructions
|
|
127
|
+
|
|
128
|
+
### Phase 1: [First Step]
|
|
129
|
+
|
|
130
|
+
1. [Detailed instruction]
|
|
131
|
+
2. [Detailed instruction]
|
|
132
|
+
|
|
133
|
+
### Phase 2: [Second Step]
|
|
134
|
+
|
|
135
|
+
1. [Detailed instruction]
|
|
136
|
+
2. [Detailed instruction]
|
|
137
|
+
|
|
138
|
+
### Phase 3: [Third Step]
|
|
139
|
+
|
|
140
|
+
1. [Detailed instruction]
|
|
141
|
+
2. [Detailed instruction]
|
|
142
|
+
|
|
143
|
+
## Output Format
|
|
144
|
+
|
|
145
|
+
When providing results:
|
|
146
|
+
- [Format requirement 1]
|
|
147
|
+
- [Format requirement 2]
|
|
148
|
+
- [Format requirement 3]
|
|
149
|
+
|
|
150
|
+
## Examples
|
|
151
|
+
|
|
152
|
+
### Example 1: [Scenario]
|
|
153
|
+
|
|
154
|
+
**Input:** [What the user provides]
|
|
155
|
+
|
|
156
|
+
**Output:** [What the skill produces]
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Supporting Files (Optional)
|
|
161
|
+
|
|
162
|
+
Skills can include multiple files in their directory:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
skill-name/
|
|
166
|
+
├── SKILL.md # Main instructions (required)
|
|
167
|
+
├── template.md # Template for output
|
|
168
|
+
├── examples/
|
|
169
|
+
│ └── sample.md # Example output
|
|
170
|
+
└── scripts/
|
|
171
|
+
└── helper.sh # Script Claude can execute
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Reference supporting files from SKILL.md:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
## Additional Resources
|
|
178
|
+
|
|
179
|
+
- For templates, see [template.md](template.md)
|
|
180
|
+
- For examples, see [examples/sample.md](examples/sample.md)
|
|
181
|
+
- To run helper script: `${CLAUDE_SKILL_DIR}/scripts/helper.sh`
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Examples
|
|
187
|
+
|
|
188
|
+
### Git Release Skill
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
---
|
|
192
|
+
name: git-release
|
|
193
|
+
description: >
|
|
194
|
+
Create consistent releases and changelogs from merged PRs. Use when
|
|
195
|
+
preparing a tagged release or generating release notes. Do not use for
|
|
196
|
+
feature branch merges, hotfix deployments, or version bumps without
|
|
197
|
+
release notes. Returns a structured release with version bump
|
|
198
|
+
recommendation, changelog entries, and a ready-to-run gh release command.
|
|
199
|
+
license: MIT
|
|
200
|
+
compatibility: opencode
|
|
201
|
+
metadata:
|
|
202
|
+
audience: maintainers
|
|
203
|
+
workflow: github
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## What I do
|
|
207
|
+
|
|
208
|
+
- Draft release notes from merged PRs
|
|
209
|
+
- Propose a version bump
|
|
210
|
+
- Provide a copy-pasteable `gh release create` command
|
|
211
|
+
|
|
212
|
+
## When to use me
|
|
213
|
+
|
|
214
|
+
Use this when you are preparing a tagged release.
|
|
215
|
+
Ask clarifying questions if the target versioning scheme is unclear.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Code Review Skill (Claude-specific)
|
|
219
|
+
|
|
220
|
+
```yaml
|
|
221
|
+
---
|
|
222
|
+
name: code-review
|
|
223
|
+
description: >
|
|
224
|
+
Review code changes for quality, security, and best practices with
|
|
225
|
+
structured feedback and severity levels. Use after code changes, pull
|
|
226
|
+
requests, or when explicitly requested to review specific files. Do not
|
|
227
|
+
use for making code changes directly, executing deployment commands, or
|
|
228
|
+
reviewing non-code files like documentation. Returns a structured review
|
|
229
|
+
with critical/major/minor severity levels, specific line references,
|
|
230
|
+
and actionable improvement suggestions.
|
|
231
|
+
disable-model-invocation: true
|
|
232
|
+
allowed-tools: Read, Grep, Glob, Bash
|
|
233
|
+
effort: high
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## What I do
|
|
237
|
+
|
|
238
|
+
Reviews code for quality, security, and best practices, providing
|
|
239
|
+
actionable feedback with severity levels.
|
|
240
|
+
|
|
241
|
+
## When to use me
|
|
242
|
+
|
|
243
|
+
Invoke with `/code-review` when you want a thorough review of
|
|
244
|
+
recent code changes.
|
|
245
|
+
|
|
246
|
+
## Instructions
|
|
247
|
+
|
|
248
|
+
!`git diff HEAD`
|
|
249
|
+
|
|
250
|
+
Review the changes above and provide:
|
|
251
|
+
1. Critical issues (must fix)
|
|
252
|
+
2. Major issues (should fix)
|
|
253
|
+
3. Minor suggestions (nice to have)
|
|
254
|
+
|
|
255
|
+
Cite specific file paths and line numbers.
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Documentation Skill
|
|
259
|
+
|
|
260
|
+
```yaml
|
|
261
|
+
---
|
|
262
|
+
name: docs-writer
|
|
263
|
+
description: >
|
|
264
|
+
Create and maintain project documentation including READMEs, API
|
|
265
|
+
references, inline comments, and technical guides. Use when documentation
|
|
266
|
+
needs to be created, updated, or reviewed, including generating JSDoc,
|
|
267
|
+
Javadoc, or docstrings. Do not use for code changes, bug fixes, or feature
|
|
268
|
+
implementations that are not documentation-related. Returns complete
|
|
269
|
+
documentation files with proper formatting, cross-references, and examples
|
|
270
|
+
including markdown, code blocks, and diagrams where appropriate.
|
|
271
|
+
arguments:
|
|
272
|
+
- doc-type
|
|
273
|
+
- target
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## What I do
|
|
277
|
+
|
|
278
|
+
Creates clear, comprehensive documentation with proper formatting.
|
|
279
|
+
|
|
280
|
+
## When to use me
|
|
281
|
+
|
|
282
|
+
Use when documentation needs to be created, updated, or reviewed.
|
|
283
|
+
|
|
284
|
+
## Instructions
|
|
285
|
+
|
|
286
|
+
Create $doc-type documentation for $target.
|
|
287
|
+
|
|
288
|
+
Follow these conventions:
|
|
289
|
+
- Use markdown formatting
|
|
290
|
+
- Include code examples
|
|
291
|
+
- Add cross-references where appropriate
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Background Knowledge Skill (Claude-specific)
|
|
295
|
+
|
|
296
|
+
```yaml
|
|
297
|
+
---
|
|
298
|
+
name: legacy-system-context
|
|
299
|
+
description: >
|
|
300
|
+
Background knowledge about the legacy payment system that provides context
|
|
301
|
+
when working on payment-related code. Automatically loaded when editing
|
|
302
|
+
payment modules. Do not use for new payment integrations, API design
|
|
303
|
+
decisions, or modern payment gateway implementations. Returns contextual
|
|
304
|
+
information about legacy endpoints, data structures, and compatibility
|
|
305
|
+
requirements that must be considered during development.
|
|
306
|
+
user-invocable: false
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Legacy Payment System Context
|
|
310
|
+
|
|
311
|
+
The legacy payment system uses SOAP XML endpoints at:
|
|
312
|
+
- Processing: https://legacy-pay.example.com/soap/process
|
|
313
|
+
- Refunds: https://legacy-pay.example.com/soap/refund
|
|
314
|
+
|
|
315
|
+
Key data structures:
|
|
316
|
+
- TransactionID: UUID format
|
|
317
|
+
- Amount: Integer in cents
|
|
318
|
+
- Currency: ISO 4217 code
|
|
319
|
+
|
|
320
|
+
When modifying payment code, always check for backwards
|
|
321
|
+
compatibility with these endpoints.
|
|
322
|
+
```
|