Skip to content

Commit 2a9d2a5

Browse files
fix(Skills): Skip "DO NOT EDIT" headers for skill files (#70)
* fix(Skills): Skip "DO NOT EDIT" headers for skill files - they are user-editable scaffolding Skills files are scaffolding code meant to be modified by users to implement business logic. They should not have "DO NOT EDIT" headers that mislead users into thinking they cannot modify these files. The fix: - Detects skill files by template key (skill.go, skill.rs, skill.ts) or path pattern (/skills/) - Excludes them from automatic header generation - Preserves the existing .adl-ignore functionality (skill files are still added automatically) This resolves the issue where users were confused by skill files having "DO NOT EDIT" headers despite being intended for user modification. Fixes #69 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Eden Reich <edenreich@users.noreply.github.com> * chore: Remove redundant comment --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
1 parent 83e92ca commit 2a9d2a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/generator/generator.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@ func (g *Generator) generateProject(templateEngine *templates.Engine, adl *schem
298298
fileType = "taskfile"
299299
}
300300

301-
if fileType != "" {
301+
isSkillFile := (templateKey == "skill.go" || templateKey == "skill.rs" || templateKey == "skill.ts") ||
302+
(strings.Contains(fileName, "/skills/") && (ext == ".go" || ext == ".rs" || ext == ".ts"))
303+
304+
if fileType != "" && !isSkillFile {
302305
header := templates.GetGeneratedFileHeader(fileType, ctx.Metadata.CLIVersion, ctx.Metadata.GeneratedAt)
303306
content = header + content
304307
}

0 commit comments

Comments
 (0)