{"slug": "i-gave-my-agent-a-skill-so-it-stops-asking-where-my-files-are", "title": "I gave my agent a skill so it stops asking where my files are", "summary": "A developer created a Claude Code skill for the Mac screenshot app SlimSnap that dynamically reads the user's screenshot folder from a config file, avoiding hardcoded paths. The skill reads ~/.slimsnap/config.json on every invocation, which the app updates on launch, so changes in preferences are automatically reflected. The approach uses a config file owned by the app at a known location, a pattern common in tools like Cursor and Raycast but rare in app-agent integrations.", "body_md": "Claude Code skills are easy to write. The hard part nobody documents: how does the skill know where your app's files live on someone else's machine?\n\nI hit this building a skill for my Mac screenshot app. The skill needs to read the latest capture. On my machine that folder is one path. On yours it's wherever you set it in preferences. Hardcode it and the skill breaks for everyone but me.\n\nHere is the pattern that fixed it, in three parts.\n\nA skill is a small markdown file in `~/.claude/skills/`\n\n. It tells Claude how to handle a class of requests. When your prompt matches, Claude reads the instructions and follows them, so you stop re-explaining the rules every session. Mine is a single SKILL.md, about 80 lines. You can read the whole thing in a minute: [bickov/slimsnap-skill](https://github.com/bickov/slimsnap-skill).\n\nIntegrations between a desktop app and a terminal agent usually fail one of two ways. You hardcode a path, and it breaks the moment the user moves the folder. Or you push config into the agent side, and every install becomes a manual setup step.\n\nThe fix is a config file at a known location that the app owns:\n\n```\n~/.slimsnap/config.json\n```\n\nThe app writes its save folder there on every launch. The skill reads it on every invocation. Change the folder in the app's preferences and the skill picks it up on the next capture. Nothing to update on the agent side.\n\nCursor does the same shape with workspace settings. Raycast extensions do it with preferences. It's rare in the app-plus-agent space mostly because apps don't think about agent integration yet.\n\nThree steps on every invocation:\n\n`~/.slimsnap/config.json`\n\nto find the captures folderThe capture format is open, MIT licensed: [bickov/slimsnap-schema](https://github.com/bickov/slimsnap-schema). If you want a skill for Aider or Codex CLI that consumes the same files, nothing is in your way.\n\n[Alex writes this section: 3 or 4 sentences on what description phrasing failed to trigger the skill and what finally worked]\n\nIf you're building any tool that an agent should act on: pick a config path under the user's home folder, have the app own it and write it on launch, have the skill read it fresh every time. That's the whole trick.\n\nThe working example end to end: [SlimSnap](https://slimsnap.ai) (free Mac app) plus the skill:\n\n```\ngit clone https://github.com/bickov/slimsnap-skill ~/.claude/skills/slimsnap\n```\n\nCapture something broken, drag an arrow at it, type what you want changed, then in Claude Code: `fix this from my screenshot`\n\n.\n\nLonger write-up of why the handoff is JSON and what's in the format: [on my blog](https://slimsnap.ai/blog/claude-code-skill).", "url": "https://wpnews.pro/news/i-gave-my-agent-a-skill-so-it-stops-asking-where-my-files-are", "canonical_source": "https://dev.to/bickov/i-gave-my-agent-a-skill-so-it-stops-asking-where-my-files-are-3lib", "published_at": "2026-07-07 07:24:03+00:00", "updated_at": "2026-07-07 07:28:27.109742+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "large-language-models"], "entities": ["Claude Code", "SlimSnap", "Cursor", "Raycast", "Aider", "Codex CLI", "bickov/slimsnap-skill", "bickov/slimsnap-schema"], "alternates": {"html": "https://wpnews.pro/news/i-gave-my-agent-a-skill-so-it-stops-asking-where-my-files-are", "markdown": "https://wpnews.pro/news/i-gave-my-agent-a-skill-so-it-stops-asking-where-my-files-are.md", "text": "https://wpnews.pro/news/i-gave-my-agent-a-skill-so-it-stops-asking-where-my-files-are.txt", "jsonld": "https://wpnews.pro/news/i-gave-my-agent-a-skill-so-it-stops-asking-where-my-files-are.jsonld"}}