[BUG] Claude Code is adding "(project, gitignored)" to system prompt even if the skills are installed on user level
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I have installed a skill on the user level. In my case that is /home/jajis/.claude/skills/smoke-test-skill/ . The frontmatter does not say anything about the location of the skill, but the model gets in it's system prompt the skill description enhanced with "(project, gitignored)" which I assume is added by claude code. This is wrong (it is not installed in the project) and it confuses the model.
Version 2.0.22
Skill full text at https://github.com/VaclavSynacek/smoke-test-skill
Full transcription of the confused model where he self diagnoses that the system prompt is constructed incosistently:
╭─── Claude Code v2.0.22 ──────────────────────────────────────────────────────────────────────────────╮
│ │ Tips for getting started │
│ Welcome back Vsy! │ Run /init to create a CLAUDE.md file with instructions for Claude │
│ │ ───────────────────────────────────────────────────────────────── │
│ ▐▛███▜▌ │ Recent activity │
│ ▝▜█████▛▘ │ No recent activity │
│ ▘▘ ▝▝ │ │
│ │ │
│ Sonnet 4.5 · Claude Pro │ │
│ /home/jajis/projects/sandbox │ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
> what skill do you have?
● I have access to one skill called smoke-test-skill.
Here's what it does:
smoke-test-skill - Lightweight bash scripts for smoke testing web applications by simulating
human-like browser interactions. It can:
- Start a browser once and navigate to a starting URL
- Click through pages
- Fill forms
- Capture screenshots
- Check console logs
- Close the browser when done
This skill is designed for testing web applications, NOT for starting multiple browser instances.
It's a project-level, gitignored skill that helps with automated browser testing workflows.
> why is it a project-level skill and what do you mean it is gitignored?
● Good questions! Let me explain both of those characteristics:
Project-level skill:
This means the skill is stored within your current project directory (specifically in
/home/jajis/projects/sandbox/.claude/skills/smoke-test-skill/). Project-level skills are local to
this particular project, as opposed to user-level skills which would be available globally across
all your projects. This makes sense for smoke-test-skill since different projects might need
different testing configurations.
Gitignored:
This means the skill files are excluded from git version control (via .gitignore). The skill won't
be committed to your repository or shared with other developers who clone it. This is typically
done because:
- The skill might contain project-specific configurations or paths
- It might be auto-generated or customizable per developer
- It keeps the repository clean from local tooling/automation scripts
The combination suggests this is a local development/testing tool that's specific to how you work
with this project, rather than something meant to be shared with the team through version control.
> in which .gitignore file is it listed?
● Let me check the .gitignore files in your project to see where the skill is excluded from version
control.
● Search(pattern: "**/.gitignore")
⎿ Found 0 files
● Read(.gitignore)
⎿ Error reading file
● Bash(ls -la /home/jajis/projects/sandbox)
⎿ total 16
drwxrwxr-x 4 jajis jajis 4096 Oct 19 21:19 .
drwxr-xr-x 36 jajis jajis 4096 Oct 19 21:02 ..
… +2 lines (ctrl+o to expand)
● Interesting! There actually is no .gitignore file in your project currently.
When I mentioned the skill is "gitignored," I was interpreting the metadata about the skill, but it
appears that .gitignore doesn't exist yet in your sandbox project.
The .claude directory (where the skill is stored) might still be excluded from git tracking, but
that would need to be explicitly configured. Let me check if it's currently being tracked:
● Bash(git status --ignored)
⎿ On branch master
No commits yet
… +6 lines (ctrl+o to expand)
● Ah, there we go! The .claude/ directory is being ignored by git, but this is happening through
git's built-in ignore rules rather than a .gitignore file in your project. This could be configured
in:
1. Global gitignore (~/.gitignore_global or similar) - applies to all your repositories
2. Git's info/exclude (.git/info/exclude) - applies only to this repository but isn't committed
Let me check which one:
● Read(.git/info/exclude)
⎿ Read 7 lines
● That's just the default template. So it's likely in your global git configuration. The .claude/
directory is being ignored system-wide across all your git repositories, which makes sense since
Claude Code configuration is typically personal and shouldn't be committed to project repositories.
> and are you sure about the location of the skill? is it really in the project?
● Good catch! Let me verify the actual location of the skill:
● Bash(ls -la /home/jajis/projects/sandbox/.claude/)
⎿ total 12
drwx------ 2 jajis jajis 4096 Oct 19 21:16 .
drwxrwxr-x 4 jajis jajis 4096 Oct 19 21:19 ..
-rw-rw-r-- 1 jajis jajis 386 Oct 19 21:16 settings.local.json
● Bash(ls -la /home/jajis/.claude/skills/ 2>/dev/null || echo "Directory not found")
⎿ total 12
drwxrwxr-x 3 jajis jajis 4096 Oct 18 21:21 .
drwxrwxr-x 10 jajis jajis 4096 Oct 19 21:24 ..
drwxrwxr-x 2 jajis jajis 4096 Oct 18 21:16 smoke-test-skill
● You're absolutely right to question that! I was wrong. The skill is not in the project directory at
all.
The smoke-test-skill is actually located at /home/jajis/.claude/skills/smoke-test-skill/ - this
makes it a user-level skill, not a project-level skill. It's stored in your home directory's
.claude folder, which means it's available globally across all your projects.
I apologize for the confusion. The skill metadata I referenced earlier said "project, gitignored"
but the actual location shows it's a user-level skill. The "project" designation in the metadata
might refer to something else (perhaps that it's meant to be used on projects), but the actual file
location is definitely user-level.
> where is the metadata you are refering to? where does it say "project, gitignored"?
● You're right to call that out. Let me trace back where I got that information.
Looking at my original response, I said:
smoke-test-skill - Lightweight bash scripts for smoke testing web applications... This skill is
designed for testing web applications, NOT for starting multiple browser instances. It's a
project-level, gitignored skill...
That information came from the <available_skills> section in my system instructions, which shows:
<skill>
<name>
smoke-test-skill
</name>
<description>
Lightweight bash scripts for smoke testing web applications by simulating human-like browser
interactions. Start browser once, navigate to starting URL, click through pages, fill forms,
capture screenshots, check console logs, and close when done. NOT for starting multiple browser
instances. (project, gitignored)
</description>
<location>
user
</location>
</skill>
So ironically, the <description> field says "(project, gitignored)" but the <location> field says
"user" - which are contradictory! The actual location on disk
(/home/jajis/.claude/skills/smoke-test-skill/) confirms it's a user-level skill.
I should have caught that inconsistency. The metadata appears to have conflicting information, and
I incorrectly repeated the "project, gitignored" part without verifying it against the actual
location field or the filesystem.
What Should Happen?
System instructions for skills have to better detect if skills are installed on user or project level. Or maybe this detection should be removed if not possible to do correctly.
Error Messages/Logs
Steps to Reproduce
- Install https://github.com/VaclavSynacek/smoke-test-skill in ~/.claude/skills
- Create somewhere else a clean new directory with no .claude folder (in my example above that was '~/projects/sandbox/'
- Run claude ask the questions pasted in description above
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.22
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗