mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-19 01:26:29 +03:00
Fix: omit allowed-tools from Claude output only (#736)
Keep allowed-tools in shared source for other providers; drop it from the Claude Code transformer and plugin rewrite so claude -p can activate the skill. Verify gate now checks parsed frontmatter, not body text. AI-assisted commit. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -290,9 +290,16 @@ describe('verifyPluginSkillRewrite', () => {
|
||||
});
|
||||
|
||||
test('fails the build when allowed-tools frontmatter survives the removal', () => {
|
||||
const p = writeSkill(
|
||||
'allowed-tools:\n - Bash(npx impeccable *)\n' + rewritePluginMarkdown(goodSkill),
|
||||
);
|
||||
const p = writeSkill([
|
||||
'---',
|
||||
'name: impeccable',
|
||||
'allowed-tools:',
|
||||
' - Bash(npx impeccable *)',
|
||||
'license: Apache 2.0',
|
||||
'---',
|
||||
'',
|
||||
rewritePluginMarkdown(goodSkill),
|
||||
].join('\n'));
|
||||
expect(() => verifyPluginSkillRewrite(p)).toThrow(/allowed-tools/);
|
||||
});
|
||||
|
||||
@@ -317,12 +324,12 @@ describe('verifyPluginSkillRewrite', () => {
|
||||
});
|
||||
|
||||
describe('SKILL.src.md frontmatter', () => {
|
||||
test('does not declare allowed-tools (issue #736)', () => {
|
||||
test('keeps allowed-tools in source for non-Claude providers (issue #736)', () => {
|
||||
const src = fs.readFileSync(
|
||||
path.join(import.meta.dirname, '../skill/SKILL.src.md'),
|
||||
'utf-8',
|
||||
);
|
||||
const { frontmatter } = parseFrontmatter(src);
|
||||
expect(frontmatter['allowed-tools']).toBeUndefined();
|
||||
expect(frontmatter['allowed-tools']).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user