Agent skill

Local Dev

by SmilyOrg in SmilyOrg/photofield

Run, test, and debug the photofield server locally. An agent skill from SmilyOrg/photofield.

MITAuto-check passedAgent Workflows

Install Local Dev

skills CLI
$ npx skills add SmilyOrg/photofield --skill local-dev -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SmilyOrg/photofield local-dev --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SmilyOrg/photofield.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/local-dev .claude/skills/local-dev && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
local-dev
GitHub stars
608
Token cost
~2.4k tokens
SKILL.md length
800 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Run, test, and debug the photofield server locally. An agent skill from SmilyOrg/photofield.

  • Works in 8 steps: Build → Configuration → Server Lifecycle → …
  • Testing the server
  • SKILL.md covers Verbose Flag, 1. Build, 2. Configuration and 3. Server Lifecycle, plus 7 more sections
  • Calls sqlite3, go and jq

What it does

Local Dev is an agent skill from SmilyOrg/photofield. Run, test, and debug the photofield server locally. Use when building, running, or testing the server, making API calls, calling MCP tools, or inspecting runtime state. Covers server lifecycle via ./tools/agent.sh server, generic HTTP calls via ./tools/agent.sh api, MCP tool calls, database inspection, error debugging, and common fixes.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers and Debugging. It works with Vue.js, Go and Model Context Protocol. The repository describes itself as: A self-hosted non-invasive single-binary photo gallery with a focus on speed and simplicity. The licence is MIT.

When your agent uses it

  • Testing the server
  • Making API calls
  • Calling MCP tools
  • Inspecting runtime state

Example prompts

  • “/local-dev”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Build
  2. Configuration
  3. Server Lifecycle
  4. MCP Tool Calls
  5. Generic API Calls
  6. Test the Server
  7. Inspect Errors and Crashes
  8. Inspect Runtime State

What it can do on your machine

Read from SKILL.md and the folder at commit ea0c7c9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • sqlite3
    • go
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Local Dev loads about 2.4k tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 800 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~88
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SmilyOrg/photofield at commit ea0c7c9, republished under its MIT licence (© SmilyOrg). 800 words, ~2,439 tokens.

Download SKILL.mdSave it as .claude/skills/local-dev/SKILL.md (or your agent's skills folder).
name
local-dev
description
Run, test, and debug the photofield server locally. Use when building, running, or testing the server, making API calls, calling MCP tools, or inspecting runtime state. Covers server lifecycle via `./tools/agent.sh server`, generic HTTP calls via `./tools/agent.sh api`, MCP tool calls, database inspection, error debugging, and common fixes.

Local Development — Running and Testing the Server

This skill covers building, running, testing, and debugging the photofield server on your local machine.

All tool invocation, server management, and API calls go through ./tools/agent.sh — a unified harness that handles the server lifecycle, generic HTTP calls, and MCP tool invocation with session management, SSE parsing, and named-arg parsing.

Verbose Flag

The harness accepts --verbose, -v, and -V. Any of these can be placed directly after ./tools/agent.sh:

bash
./tools/agent.sh --verbose mcp call get_photo --file_id 1
./tools/agent.sh -v mcp call get_photo --file_id 1
./tools/agent.sh -V mcp call get_photo --file_id 1

Or avoid the flag entirely via environment variable:

bash
AGT_VERBOSE=1 ./tools/agent.sh mcp call get_photo --file_id 1

1. Build

bash
go build -o photofield .

Kill any old instance before rebuilding:

bash
./tools/agent.sh server kill

2. Configuration

The server reads data/configuration.yaml. Without it, collections point to empty directories.

Minimal setup:

bash
mkdir -p data
cat > data/configuration.yaml <<EOF
collections:
  - name: test
    dirs:
      - docs/assets
EOF

3. Server Lifecycle

Use ./tools/agent.sh server <command> to manage the server process:

bash
# Start (auto-detects if already running)
./tools/agent.sh server start

# Stop gracefully (uses PID file)
./tools/agent.sh server stop

# Restart
./tools/agent.sh server restart

# Check status (shows PID and port listeners)
./tools/agent.sh server status

# Aggressive kill (PID file + all port listeners including exiftool)
./tools/agent.sh server kill

How it works: server start launches the binary with nohup and writes a PID file to data/agent.pid. It then polls the server endpoint until ready (up to 30s). server stop reads the PID file and sends SIGTERM. server kill sends SIGKILL to the PID and anything else listening on the port.

Important: The server does not auto-scan. After starting, run a scan:

bash
./photofield -scan test
# or from another directory:
AGT_BIN=/path/to/photofield ./tools/agent.sh server start && ./photofield -scan test

The server listens on port 8080 by default (override with AGT_PORT).

Note: With AGT_START=true (the default), mcp call, mcp quick, and mcp shell will auto-start the server if it is not already running. The server start, server stop, server restart, server status, and server kill commands manage the process regardless of AGT_START.

Stale PID cleanup

If the server crashes without a clean shutdown, the PID file may become stale. The harness auto-detects this: server start will clean up a dead PID file and launch a new instance. server status also removes stale entries.

4. MCP Tool Calls

Use ./tools/agent.sh mcp to call MCP tools. The harness handles the session handshake (initialize + initialized notification), session ID extraction from response headers, SSE response parsing, and named-arg to JSON conversion.

Tool commands
bash
# Call a tool with JSON args
./tools/agent.sh mcp call list_collections '{}'

# Call with named args (auto-detects --key val pairs)
./tools/agent.sh mcp call search_photos --query 'beach' --collection_id 'test' --limit 3

# Verbose mode — shows full raw JSON response
./tools/agent.sh --verbose mcp call get_photo --file_id 1 --w 200

# Smoke test (calls list_collections by default)
./tools/agent.sh mcp quick

# Smoke test with a specific tool
./tools/agent.sh mcp quick get_photo --file_id 1

# Interactive REPL
./tools/agent.sh mcp shell
Argument modes
ModeSyntax
JSON./tools/agent.sh mcp call <tool> '<json>'
Named./tools/agent.sh mcp call <tool> --key val

Named args are auto-converted to JSON: numbers stay numeric, true/false become booleans, null stays null, everything else is quoted as strings. agent.sh auto-detects the named-arg mode when the first token starts with --, so no explicit -- -- boundary is ever needed.

Output

Non-verbose mode shows a clean summary:

✓ list_collections — 22 items
✓ events — 19 events
✓ get_photo

Errors show with a red ✗ and the error message. Set --verbose (see Verbose Flag above) for full raw JSON on every call.

Output streams: The log_* helpers (ℹ, ▶) go to stderr. Tool result summaries (✓, ✗) and raw JSON output go to stdout. This lets you pipe tool results: ./tools/agent.sh mcp call list_collections '{}' | jq '.collections'.

From another directory
bash
AGT_BIN=/path/to/photofield ./tools/agent.sh mcp call list_collections '{}'
AGT_URL=http://remote-host:9000/mcp ./tools/agent.sh mcp call list_collections '{}'

5. Generic API Calls

Use ./tools/agent.sh api for arbitrary HTTP calls to any server endpoint. This is useful for testing non-MCP routes, debugging, or calling endpoints that don't have a dedicated tool.

bash
# GET request (health check)
./tools/agent.sh api GET http://localhost:8080/health

# POST with JSON body
./tools/agent.sh api POST http://localhost:8080/api/collections \
  '{"name":"my-collection","dirs":["/path/to/photos"]}'

# POST with named args (auto-constructs JSON body)
./tools/agent.sh api POST http://localhost:8080/api/collections \
  --name my-collection --dirs /path/to/photos

# PUT / DELETE
./tools/agent.sh api DELETE http://localhost:8080/api/collections/test

The output shows the HTTP status code, pretty-printed JSON when possible, and the response body (truncated if over 500 chars). Note: AGT_VERBOSE=1 does not currently change the truncation behavior for API calls.

Show full SKILL.md (309 more words)Show less
Health Check

The server exposes a health check endpoint at /health:

bash
./tools/agent.sh api GET http://localhost:8080/health

Returns {"status": "ok"} when healthy.

6. Test the Server

Tool tests
bash
# Basic call
./tools/agent.sh mcp call get_photo --file_id 1

# Metadata-only call
./tools/agent.sh mcp call get_photo_metadata --file_id 1

# Error handling
./tools/agent.sh mcp call get_photo --file_id 999999

# Verbose debugging
./tools/agent.sh --verbose mcp call search_photos --query 'test' --collection_id 'test'
API tests
bash
# Check health
./tools/agent.sh api GET http://localhost:8080/health

# List collections via API (alternative to mcp call)
./tools/agent.sh api GET http://localhost:8080/api/collections

7. Inspect Errors and Crashes

The harness captures the server's entire stdout and stderr to data/agent.log via nohup. Panics and errors appear in this log:

bash
tail -100 data/agent.log
Session warnings

If the server does not return a Mcp-Session-Id header, the harness continues without one (some MCP servers don't require it). You will see a benign info message: No session ID (server may not require one).

SymptomCauseFix
cannot create context from nil parentNil context passed to WithTimeoutAdd if ctx == nil { ctx = context.Background() } in handler
file not found: NPhoto ID doesn't existScan collection or check DB
Empty response dataRendering panicCheck server log
Schema says all fields requiredSDK infers from Go struct pointersUse explicit InputSchema in tool registration
Server not respondingOld binary running./tools/agent.sh server kill then rebuild
No photos foundConfig points to empty dirsCreate data/configuration.yaml

8. Inspect Runtime State

Database
bash
sqlite3 data/photofield.cache.db "SELECT id, width, height FROM infos ORDER BY id;"
sqlite3 data/photofield.cache.db ".tables"
Via the harness
bash
# List collections
./tools/agent.sh mcp call list_collections '{}'

# Check events for a collection
./tools/agent.sh mcp call events --collection_id 'test'

# Search photos
./tools/agent.sh mcp call search_photos --query 'faces' --collection_id 'test' --limit 5

Environment Variables

VariableDefaultPurpose
AGT_PORT8080Server port
AGT_BIN./photofieldPath to binary
AGT_DATA_DIR./dataData directory
AGT_STARTtrueAuto-start server if not running
AGT_URL(derived)Full MCP endpoint URL
AGT_API_BASEhttp://localhost:$PORTBase URL for API calls
AGT_VERBOSE0Verbose output

Quick Reference

CommandPurpose
go build -o photofield .Build the server
./photofield -scan <name>Scan a collection
./tools/agent.sh server startStart the server
./tools/agent.sh server stopStop the server
./tools/agent.sh server restartRestart the server
./tools/agent.sh server statusShow PID/port status
./tools/agent.sh server killKill server processes
./tools/agent.sh mcp call <tool> <args>Call an MCP tool
./tools/agent.sh mcp quick [tool]Smoke test
./tools/agent.sh mcp shellInteractive REPL
./tools/agent.sh api <method> <url> [body]Generic HTTP call
./tools/agent.sh --verbose <cmd>Verbose output (see Verbose Flag above for -v/-V/env var)
sqlite3 data/photofield.cache.db ...Inspect the database

© SmilyOrg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/local-dev of SmilyOrg/photofield.

Open the folder on GitHubat commit ea0c7c9

Compare with similar skills

Local Dev next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Local Dev compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local Dev this skillSmilyOrg/photofield608—~2.4kAutomated safety check: PassMIT
Embedded DebuggerAdancurusul/embedded-debugger-mcp199—~1.4kAutomated safety check: PassMIT
Domscribepatchorbit/domscribe193—~3.3kAutomated safety check: NotesMIT
Memorywhalewuisabel-gif/MemWhale151—~765Automated safety check: PassMIT
Helmor Debug Operatedohooo/helmor1.3k—~6.6kAutomated safety check: PassApache-2.0
MCP Inspectoradeze/raindrop-mcp188—~421Automated safety check: PassMIT

Similar skills

  • Embedded Debugger

    Adancurusul/embedded-debugger-mcp

    Embedded hardware debugging workflow for probe-rs targets using embedded-debugger-mcp.

    199 GitHub stars~1.4k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Domscribe

    patchorbit/domscribe

    Work with Domscribe — the pixel-to-code bridge. An agent skill from patchorbit/domscribe.

    193 GitHub stars~3.3k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check: notes
  • Memorywhale

    wuisabel-gif/MemWhale

    Query and write durable debugging memory recorded by MemoryWhale.

    151 GitHub stars~765 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Operate, reproduce, and debug a running local Helmor desktop development build through the Tauri MCP bridge.

    1.3k GitHub stars~6.6k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Inspector

    adeze/raindrop-mcp

    MCP Protocol Inspection and Debugging with Inspector CLI. An agent skill from adeze/raindrop-mcp.

    188 GitHub stars~421 tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Devcontainer Dev

    stacklok/toolhive-studio

    Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD).

    170 GitHub stars~3.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes

More from SmilyOrg/photofield

  • Release

    SmilyOrg/photofield

    Follow the Photofield release process: batch changelog entries, create the release commit and tag, and push.

    608 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Security Updates

    SmilyOrg/photofield

    Check and apply security updates across the photofield project (api/Go, ui/npm, docs/npm, e2e/npm).

    608 GitHub stars~808 tokensUpdated 1 mo ago
    Auto-check passed

Questions about Local Dev

What does Local Dev do?

Run, test, and debug the photofield server locally. An agent skill from SmilyOrg/photofield. Local Dev is an agent skill from SmilyOrg/photofield. Run, test, and debug the photofield server locally.

When should I use Local Dev?

Local Dev fits situations like: testing the server; making API calls; calling MCP tools; inspecting runtime state.

How do I install Local Dev in Claude Code?

Run `npx skills add SmilyOrg/photofield --skill local-dev -a claude-code`. Or copy the skill folder (.agents/skills/local-dev in SmilyOrg/photofield) into .claude/skills/local-dev in your project. Claude Code loads it when a task matches its description.

How do I install Local Dev in Codex?

Run `npx skills add SmilyOrg/photofield --skill local-dev -a codex`. Or copy the skill folder (.agents/skills/local-dev in SmilyOrg/photofield) into .agents/skills/local-dev in your project. Codex loads it when a task matches its description.

Can I use Local Dev in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SmilyOrg/photofield --skill local-dev -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/local-dev, .gemini/skills/local-dev, .github/skills/local-dev and .opencode/skills/local-dev in your project.

What does Local Dev need to run?

Going by SKILL.md and its folder, Local Dev needs the command-line tools its instructions call (sqlite3, go and jq).

Does Local Dev access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Local Dev safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Local Dev use?

Local Dev is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Local Dev use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Local Dev?

Skills that share tags, products or a category with Local Dev: Embedded Debugger (Adancurusul/embedded-debugger-mcp, 199 stars), Domscribe (patchorbit/domscribe, 193 stars), Memorywhale (wuisabel-gif/MemWhale, 151 stars) and Helmor Debug Operate (dohooo/helmor, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local Dev?

SmilyOrg (a GitHub user) maintains it in SmilyOrg/photofield, which has 608 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on August 17, 2026.

Source: SmilyOrg/photofield on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.