academic-writing
Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…
Forward the real client address from a server-side proxy to a backend without trusting forgeable headers. Use when an API behind a BFF or reverse proxy rate-limits or audits every user as one address.
Claude Code
$ npx -y skills add KhaledSaeed18/dotclaude --skill proxy-client-address --agent claude-code
Codex
$ npx skills add KhaledSaeed18/dotclaude --skill proxy-client-address -a codex -y
Cursor
$ npx skills add KhaledSaeed18/dotclaude --skill proxy-client-address -a cursor -y
Gemini CLI
$ npx skills add KhaledSaeed18/dotclaude --skill proxy-client-address -a gemini-cli -y
GitHub Copilot
$ npx skills add KhaledSaeed18/dotclaude --skill proxy-client-address -a github-copilot -y
OpenCode
$ npx skills add KhaledSaeed18/dotclaude --skill proxy-client-address -a opencode -y
Windsurf
$ npx skills add KhaledSaeed18/dotclaude --skill proxy-client-address -a windsurf -y
name: proxy-client-address description: Forward the real client address from a server-side proxy to a backend without trusting forgeable headers. Use when an API behind a BFF or reverse proxy rate-limits or audits every user as one address. argument-hint: "(optional) the front-end proxy file and the backend's middleware"
When a browser calls a front-end server that forwards to an API, the API's peer is the front-end for every user: one rate-limit bucket and one audit address for everyone. Fix it with a named address the API believes only next to a shared secret, derived from the one forwarded header the edge proxy wrote itself.
Read the edge proxy's configuration (Traefik: `docker inspect coolify-proxy --format '{{json .Args}}' | grep -i forwarded`). With no trusted IPs configured, Traefik discards client-sent `X-Forwarded-*` and writes the peer address itself, so the **last** entry is the client; a platform edge behaves the same. If trusted IPs or `insecure` are set, the client's forged entries survive in front of the real one and the last entry is still the real one. A Node server does not append. Document the finding.
In the Next.js proxy (or middleware), for `/api/*` requests: when the secret is configured, rewrite to the API origin with two added request headers, else return nothing and let `next.config` rewrites handle it. Server-side fetches (Server Components) add the same headers from `next/headers`. Snippets in [reference/snippets.md](./reference/snippets.md).
A middleware early in the chain: read both headers, delete them, verify the presented secret against the configured one on SHA-256 digests with `timingSafeEqual`, accept the named address only if it is a valid IP, else use `req.ip`. Store the result on the request (`req.clientIp`) and make the rate limiter's key generator and the audit writer read it. `trust proxy` stays set for `req.ip` to be meaningful behind the edge.
1. Ship both code sides (they are inert without the secret). 2. Owner sets `API_PROXY_SECRET` on the front-end app and `DASHBOARD_PROXY_SECRET` (or the chosen name) on the API, same value, then redeploys both. 3. Prove it: a request through the front-end to a non-existent API route with a forged `X-Forwarded-For: 203.0.113.9`, from two different networks, must be logged by the API with each real address; the same forged header plus a wrong secret sent straight to the API must be logged with the sender's address. The `deploy-verification` skill has the commands.
Report the proxy finding, the header names chosen, the variable names on each side, and the proof lines from the API log.
Reusable Claude Code extension registry. skills, subagents, slash commands, and hooks for engineering, git, testing, and security workflows. Distributed as a shadcn GitHub registry and as installable plugins.
Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…
Report computational benchmarks and experimental comparisons the way examiners and reviewers expect: fair baselines run under the…
Maintain the thesis .bib file as a single source of truth: fetch verified BibTeX from a DOI, arXiv id, or title via CrossRef and…
Expand a set of key papers into the literature around them by walking the citation graph with the Semantic Scholar and OpenAlex…
Audit every citation in a chapter, paper, or proposal against the .bib file and the real world: each cite key must exist, each…
Structure a thesis whose contribution is a built artifact (tool, system, method, model) using design science research: explicit…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.