Agent skill

API Endpoint

by Touch-N-Stars in Touch-N-Stars/Touch-N-Stars

Add or change an API call between the app and its backends — the Touch'N'Stars plugin server (C), the NINA Advanced API, or the PINS daemon.

GPL-3.0Auto-check passedBackend & APIs

Install API Endpoint

skills CLI
$ npx skills add Touch-N-Stars/Touch-N-Stars --skill api-endpoint -a claude-code

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

GitHub CLI
$ gh skill install Touch-N-Stars/Touch-N-Stars api-endpoint --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/Touch-N-Stars/Touch-N-Stars.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/api-endpoint .claude/skills/api-endpoint && 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
api-endpoint
GitHub stars
123
Token cost
~1.3k tokens
SKILL.md length
570 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
GPL-3.0

At a glance

Add or change an API call between the app and its backends — the Touch'N'Stars plugin server (C), the NINA Advanced API, or the PINS daemon.

  • Wiring a new endpoint into src/services/api/
  • SKILL.md covers Pick the right base URL first, Backend: plugin server…, Frontend: domain module, then… and PINS vs. NINA, plus 2 more sections
  • Calls node
  • A request hits the wrong port

What it does

API Endpoint is an agent skill from Touch-N-Stars/Touch-N-Stars. Add or change an API call between the app and its backends — the Touch'N'Stars plugin server (C), the NINA Advanced API, or the PINS daemon. Use when wiring a new endpoint into src/services/api/, when a request hits the wrong port or host, or when the apiService surface snapshot test fails.

Its SKILL.md is about 1.3k 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 Backend & APIs, covering REST APIs. It works with C#. The repository describes itself as: a WebApp to controll NINA. The licence is GPL-3.0.

When your agent uses it

  • Wiring a new endpoint into src/services/api/
  • A request hits the wrong port
  • The apiService surface snapshot test fails

Example prompts

  • “/api-endpoint”

What it can do on your machine

Read from SKILL.md and the folder at commit c7af082. 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:

    • node

    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

API Endpoint loads about 1.3k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 570 words of instructions outside code blocks.

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

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 Touch-N-Stars/Touch-N-Stars at commit c7af082, republished under its GPL-3.0 licence (© Touch-N-Stars). 570 words, ~1,270 tokens.

Download SKILL.mdSave it as .claude/skills/api-endpoint/SKILL.md (or your agent's skills folder).
name
api-endpoint
description
Add or change an API call between the app and its backends — the Touch'N'Stars plugin server (C#), the NINA Advanced API, or the PINS daemon. Use when wiring a new endpoint into src/services/api/, when a request hits the wrong port or host, or when the apiService surface snapshot test fails.

Adding an API endpoint

A new endpoint usually spans two repositories. Both are configured as working directories:

  • Plugin server (C#) — …/N.I.N.A-Plugin-for-Touch-N-Stars/Touch-N-Stars/Server/Controllers/*.cs and Server/Services/*.cs
  • App (this repo) — src/services/api/<domain>.js → src/services/apiService.js → a Pinia store

Pick the right base URL first

The most common mistake is not the code, it is the host/port. getUrls() in src/services/api/core.js:52 returns five, built in getBaseUrl() (line 30):

KeyPoints atUse for
BASE_URLhttp://<host>:<store.apiPort>/v2/apiNINA Advanced API V2
API_URLhttp://<host>:<connection.port>/api/Touch'N'Stars plugin server
PLUGINSERVER_URLplugin server root, no pathnon-/api plugin routes
TARGETPIC_URLplugin server /api/targetpictarget thumbnails
PINSDAEMON_URLhttp://<host>:8000PINS system daemon

The two ports differ on purpose: the plugin server sits on the instance port the user configured, the Advanced API on the apiPort learned during the handshake. src/services/__tests__/apiServiceEndpoints.test.js pins exactly this.

In dev, port 8080 is rewritten to 5000 (core.js:37-40). The same rewrite is duplicated in apiPinsService.js:17-20.

Backend: plugin server controller

Controllers are EmbedIO WebApiControllers with [Route(HttpVerbs.Get, "/…")] (see MetricsController.cs for the minimal shape: a static service instance and a Task<T>-returning method). A new controller must be registered in Server/TouchNStarsServer.cs:45 with .WithController<…>() — the routes are not discovered automatically. The whole API is mounted under /api, which is why the frontend uses API_URL.

Keep logic in Server/Services/, not in the controller.

Frontend: domain module, then facade

Add the method to the matching module in src/services/api/ — 17 domain modules (camera, mount, phd2, sequence, profile, system, framing, image, flats, filesystem, plugins, tppa, equipment, hocusfocus, pinsDevices, tenmicron, atlas) plus core.js, which is infrastructure and not spread into the facade. Use the helpers from core.js rather than raw axios where they fit: simpleGetRequest(url) and getWithParams(url, params) both unwrap response.data and rethrow.

js
async getFoo(id) {
  const { BASE_URL } = getUrls();
  return simpleGetRequest(`${BASE_URL}/equipment/foo/${id}`);
}

Call getUrls() inside the method. Hoisting it to module scope freezes the host/port from before the user connected.

src/services/apiService.js spreads all 17 domain modules into one object, so two modules exporting the same method name silently overwrite each other. That is what the snapshot test guards.

The snapshot test

Adding or removing a method breaks src/services/__tests__/apiServiceSurface.test.js until you regenerate:

bash
node --import ./scripts/test-loader.mjs scripts/dump-api-surface.mjs

The failure message names this command itself. Regenerate deliberately — a surprise diff there usually means an accidental name collision, not a stale snapshot.

Show full SKILL.md (218 more words)Show less

PINS vs. NINA

src/services/apiPinsService.js is a separate service for PINS-only endpoints and carries its own copy of getBaseUrl — with a different key name (pinsSystem alongside pinsDaemon). Changing host/port logic in one place and not the other creates silent drift; check both.

PINS daemon calls need a bearer token: getPinsDaemonAuthHeaders() from core.js:88, which resolves through instance settings, store settings, several localStorage keys, and finally the default token.

Never branch UI behavior on store.isPINS when the field itself can simply be probed. Feature-detect on the payload instead, as src/store/cameraStore.js:109 does for TempChangeRunning: use the real value when the backend reports it, fall back to a heuristic when it does not. That keeps the app working against official NINA/ninaAPI builds which lack the field.

Store integration

New data is delivered by the 2 s poll (fetchAllInfos in src/store/store.js), not by the WebSocket — /v2/socket does not deliver every state change. Add the fetch there, and drop unchanged payloads before writing to the store rather than polling faster.

Testing

Follow apiServiceEndpoints.test.js: installBrowserGlobals(), then freshPinia(), then mock axios.get and assert on the URL that was built.

Gotcha: apiService caches its store references from the first active Pinia. A test file must use one Pinia for all its tests and mutate store state per test — a fresh Pinia per test silently keeps the old references.

© Touch-N-Stars, GPL-3.0. 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 .claude/skills/api-endpoint of Touch-N-Stars/Touch-N-Stars.

Open the folder on GitHubat commit c7af082

Compare with similar skills

API Endpoint 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.

API Endpoint compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Endpoint this skillTouch-N-Stars/Touch-N-Stars123—~1.3kAutomated safety check: PassGPL-3.0
Dotnet Webapidotnet/skills5.6k2 repos~5.5kAutomated safety check: PassMIT
C# and .NET DeveloperJeffallan/claude-skills12k—~1.3kAutomated safety check: PassMIT
Writing Csharp Codemicrosoft-foundry/foundry-agent-webapp127—~3.2kAutomated safety check: NotesMIT
NpgsqlrestNpgsqlRest/NpgsqlRest132—~7kAutomated safety check: NotesMIT
Maui Sqlite Databasedavidortinau/maui-skills174—~1.2kAutomated safety check: PassMIT

Similar skills

  • Dotnet Webapi

    dotnet/skills

    Official

    Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling.

    5.6k GitHub starsUsed in 2 repos~5.5k tokens
    Backend & APIsAuto-check passed
  • C# and .NET Developer

    Jeffallan/claude-skills

    Guides C# work on .NET 8+: ASP.NET Core APIs, Entity Framework Core data access, Blazor apps and CQRS with MediatR, following a five-step build workflow.

    12k GitHub stars~1.3k tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Writing Csharp Code

    microsoft-foundry/foundry-agent-webapp

    Provides C and ASP.NET Core coding standards for this repository.

    127 GitHub stars~3.2k tokensUpdated 5 mo ago
    Backend & APIsAuto-check: notes
  • Npgsqlrest

    NpgsqlRest/NpgsqlRest

    Build and modify REST APIs with NpgsqlRest — exposing PostgreSQL as HTTP endpoints from two sources (database functions/procedures/tables/views, and plain .sql files), driven by SQL comment…

    132 GitHub stars~7k tokensUpdated 5 days ago
    DatabasesAuto-check: notes
  • Maui Sqlite Database

    davidortinau/maui-skills

    Add SQLite local database storage to .NET MAUI apps using sqlite-net-pcl.

    174 GitHub stars~1.2k tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Dotnet Cop

    fmflurry/settings-opencode

    Pre-merge code review for .NET 10 pull requests. An agent skill from fmflurry/settings-opencode.

    171 GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from Touch-N-Stars/Touch-N-Stars

  • Changelog

    Touch-N-Stars/Touch-N-Stars

    Write or fix a CHANGELOG.md release entry. An agent skill from Touch-N-Stars/Touch-N-Stars.

    123 GitHub stars~725 tokensUpdated 2 days ago
    Auto-check passed
  • Equipment

    Touch-N-Stars/Touch-N-Stars

    Work on equipment devices — INDI driver selection, device lists, connect/disconnect, and the NINA profile values behind them (camera, mount, focuser, filter wheel, rotator, switch, weather, flat…

    123 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Feature Kickoff

    Touch-N-Stars/Touch-N-Stars

    Turn a rough feature idea into a written goal and testable acceptance criteria before any code is written.

    123 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • I18n

    Touch-N-Stars/Touch-N-Stars

    Add, rename, or remove user-facing strings in src/locales. An agent skill from Touch-N-Stars/Touch-N-Stars.

    123 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • Setup Wizard

    Touch-N-Stars/Touch-N-Stars

    Work on the first-run / equipment setup wizard (src/components/setupWizard/) or on location and coordinate handling.

    123 GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed
  • Tns Review

    Touch-N-Stars/Touch-N-Stars

    Review changed Touch'N'Stars code with three parallel agents, one each for functionality, UI and maintainability, against this project's own rules (NINA/PINS dual mode, polling contract…

    123 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about API Endpoint

What does API Endpoint do?

Add or change an API call between the app and its backends — the Touch'N'Stars plugin server (C), the NINA Advanced API, or the PINS daemon. API Endpoint is an agent skill from Touch-N-Stars/Touch-N-Stars. Add or change an API call between the app and its backends — the Touch'N'Stars plugin server (C), the NINA Advanced API, or the PINS daemon.

When should I use API Endpoint?

API Endpoint fits situations like: wiring a new endpoint into src/services/api/; A request hits the wrong port; the apiService surface snapshot test fails.

How do I install API Endpoint in Claude Code?

Run `npx skills add Touch-N-Stars/Touch-N-Stars --skill api-endpoint -a claude-code`. Or copy the skill folder (.claude/skills/api-endpoint in Touch-N-Stars/Touch-N-Stars) into .claude/skills/api-endpoint in your project. Claude Code loads it when a task matches its description.

How do I install API Endpoint in Codex?

Run `npx skills add Touch-N-Stars/Touch-N-Stars --skill api-endpoint -a codex`. Or copy the skill folder (.claude/skills/api-endpoint in Touch-N-Stars/Touch-N-Stars) into .agents/skills/api-endpoint in your project. Codex loads it when a task matches its description.

Can I use API Endpoint 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 Touch-N-Stars/Touch-N-Stars --skill api-endpoint -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-endpoint, .gemini/skills/api-endpoint, .github/skills/api-endpoint and .opencode/skills/api-endpoint in your project.

What does API Endpoint need to run?

Going by SKILL.md and its folder, API Endpoint needs the command-line tools its instructions call (node).

Does API Endpoint 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 API Endpoint 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 API Endpoint use?

API Endpoint is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Endpoint use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 API Endpoint?

Skills that share tags, products or a category with API Endpoint: Dotnet Webapi (dotnet/skills, 5.6k stars), C# and .NET Developer (Jeffallan/claude-skills, 12k stars), Writing Csharp Code (microsoft-foundry/foundry-agent-webapp, 127 stars) and Npgsqlrest (NpgsqlRest/NpgsqlRest, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Endpoint?

Touch-N-Stars (a GitHub organization) maintains it in Touch-N-Stars/Touch-N-Stars, which has 123 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

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