FastAPI-Redis SDK Development
redis/fastapi-redis-sdk
Guides development on the fastapi-redis-sdk library itself - its connection lifecycle, dependency-injected caching, and async/sync bridging.
Performance best practices for Relay applications. An agent skill from hackers-pub/hackerspub.
$ npx skills add hackers-pub/hackerspub --skill relay-performance -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install hackers-pub/hackerspub relay-performance --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/hackers-pub/hackerspub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/relay-performance .claude/skills/relay-performance && rm -rf skills-srcUse ~/.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/
Install the "relay-performance" agent skill from https://github.com/hackers-pub/hackerspub/tree/main/.agents/skills/relay-performance into .claude/skills/relay-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "relay-performance", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/hackers-pub/hackerspub/tree/main/.agents/skills/relay-performanceType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add hackers-pub/hackerspub --skill relay-performance -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install hackers-pub/hackerspub relay-performance --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hackers-pub/hackerspub.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/relay-performance .agents/skills/relay-performance && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "relay-performance" agent skill from https://github.com/hackers-pub/hackerspub/tree/main/.agents/skills/relay-performance into .agents/skills/relay-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "relay-performance", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add hackers-pub/hackerspub --skill relay-performance -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install hackers-pub/hackerspub relay-performance --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hackers-pub/hackerspub.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/relay-performance .cursor/skills/relay-performance && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "relay-performance" agent skill from https://github.com/hackers-pub/hackerspub/tree/main/.agents/skills/relay-performance into .cursor/skills/relay-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "relay-performance", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/hackers-pub/hackerspub.git --path .agents/skills/relay-performance--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add hackers-pub/hackerspub --skill relay-performance -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install hackers-pub/hackerspub relay-performance --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hackers-pub/hackerspub.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/relay-performance .gemini/skills/relay-performance && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "relay-performance" agent skill from https://github.com/hackers-pub/hackerspub/tree/main/.agents/skills/relay-performance into .gemini/skills/relay-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "relay-performance", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install hackers-pub/hackerspub relay-performanceInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add hackers-pub/hackerspub --skill relay-performance -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/hackers-pub/hackerspub.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/relay-performance .github/skills/relay-performance && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "relay-performance" agent skill from https://github.com/hackers-pub/hackerspub/tree/main/.agents/skills/relay-performance into .github/skills/relay-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "relay-performance", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add hackers-pub/hackerspub --skill relay-performance -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install hackers-pub/hackerspub relay-performance --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hackers-pub/hackerspub.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/relay-performance .opencode/skills/relay-performance && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "relay-performance" agent skill from https://github.com/hackers-pub/hackerspub/tree/main/.agents/skills/relay-performance into .opencode/skills/relay-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "relay-performance", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
relay-performancePerformance best practices for Relay applications. An agent skill from hackers-pub/hackerspub.
Relay Performance is an agent skill from hackers-pub/hackerspub. Performance best practices for Relay applications. Use when optimizing data fetching, reducing re-renders, configuring caching, or improving time to first meaningful paint. Covers query placement, @defer, pagination, fetch policies, garbage collection, fragment granularity, and server-side filtering. Companion to the relay-best-practices skill which covers correctness and architecture.
Its SKILL.md is about 2.2k 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 Backend development and Caching. The repository describes itself as: ActivityPub-enabled social network for hackers. The licence is AGPL-3.0.
Read from SKILL.md and the folder at commit 7280aa7. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and graphql).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Relay Performance loads about 2.2k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 621 words of instructions outside code blocks.
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.
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.
The full file from hackers-pub/hackerspub at commit 7280aa7, republished under its AGPL-3.0 licence (© hackers-pub). 621 words, ~2,205 tokens.
.claude/skills/relay-performance/SKILL.md (or your agent's skills folder).Performance-focused guidance for Relay applications. For correctness, naming,
and architectural patterns, see the relay-best-practices skill.
For detailed API documentation, read the relevant page from <llm-docs>/
(available in node_modules/relay-runtime/llm-docs/ after v20.1.1).
Each screen or route should have one (or very few) root queries. Relay coalesces all fragment data needs into a single network request per query. Multiple root queries on the same screen defeat this optimization — the browser makes multiple parallel requests that each carry redundant overhead (HTTP headers, connection setup, response parsing).
GOOD: BAD:
Route → 1 query Route → 3 queries
├─ Header (fragment) ├─ Header (query #1)
├─ Content (fragment) ├─ Content (query #2)
└─ Sidebar (fragment) └─ Sidebar (query #3)Fetch the initial query before calling createRoot().render(). This
overlaps the network request with React's initialization, minimizing time to
first meaningful paint.
// Start fetch immediately — before React even initializes
const queryRef = loadQuery(environment, AppQuery, initialVariables);
// Then render — data may already be available
const root = createRoot(document.getElementById('root'));
root.render(
<RelayEnvironmentProvider environment={environment}>
<Suspense fallback={<AppSkeleton />}>
<App queryRef={queryRef} />
</Suspense>
</RelayEnvironmentProvider>
);@defer for Non-Critical ContentDefer secondary or below-the-fold content so primary UI renders faster. Relay streams deferred data progressively via Suspense — the initial response arrives smaller and the critical path renders sooner.
query ProfileScreenQuery($id: ID!) {
user(id: $id) {
...ProfileHeader_user
...ProfileDetails_user @defer
...ProfileComments_user @defer
}
}function ProfileScreen({ queryRef }) {
const data = usePreloadedQuery(ProfileScreenQuery, queryRef);
return (
<ScrollView>
<ProfileHeader user={data.user} />
<Suspense fallback={<DetailsSkeleton />}>
<ProfileDetails user={data.user} />
</Suspense>
<Suspense fallback={<CommentsSkeleton />}>
<ProfileComments user={data.user} />
</Suspense>
</ScrollView>
);
}Good candidates for @defer:
store-or-network (the default) is correct for most cases — it reuses cached
data and only hits the network for missing or stale data.
| Policy | When to use |
|---|---|
store-or-network | Default. Best balance of speed and freshness. |
store-and-network | Show cached data immediately, update in background. |
network-only | Freshness is critical (e.g., after a mutation with wide side effects). |
store-only | Offline-first or reading data already guaranteed to be in the store. |
Reserve network-only for rare cases. Overusing it turns Relay into a
no-cache client and eliminates the benefit of the normalized store.
Set gcReleaseBufferSize on the Relay Store to retain recently-used queries
after their components unmount. The default is 10. This makes navigating back
to a previously visited screen instant (data is still in the store) instead of
triggering a new network request.
const store = new Store(new RecordSource(), {
gcReleaseBufferSize: 20,
});For apps with many screens or heavy navigation, increase the buffer. For memory-constrained environments (mobile), keep it conservative.
Use GraphQL field arguments to filter and sort data on the server rather than fetching everything and processing in JavaScript.
// BAD: fetch all tasks, filter on client
const data = useFragment(graphql`
fragment TaskList_user on User {
tasks { id, title, status }
}
`, user);
const active = data.tasks.filter(t => t.status === 'ACTIVE');
// GOOD: filter on server via field argument
const data = useFragment(graphql`
fragment TaskList_user on User {
tasks(status: ACTIVE) { id, title }
}
`, user);Server-side filtering reduces payload size, avoids unnecessary network transfer, and reduces memory usage on the client.
Always paginate list fields using @connection + usePaginationFragment.
Fetching an entire collection at once risks transferring megabytes of data,
stalling the UI during normalization, and exhausting device memory.
Start with a page size appropriate for the viewport (e.g., 10–20 items) and load more on scroll.
# BAD: fetches every item — unbounded
fragment NotificationList_user on User {
notifications {
id
message
}
}
# GOOD: paginated with a bounded first page
fragment NotificationList_user on User
@argumentDefinitions(
count: { type: "Int", defaultValue: 10 }
cursor: { type: "String" }
)
@refetchable(queryName: "NotificationListPaginationQuery") {
notifications(first: $count, after: $cursor)
@connection(key: "NotificationList_notifications") {
edges {
node {
id
message
}
}
}
}Split large fragments into smaller, component-scoped fragments so Relay can re-render only the components whose data actually changed. A single monolithic fragment shared by many components causes all of them to re-render when any field in the fragment changes.
// BAD: one large fragment, all children re-render on any field change
function PostCard({ post }) {
const data = useFragment(graphql`
fragment PostCard_post on Post {
title
body
author { name, profilePicture { uri } }
likeCount
commentCount
}
`, post);
return (
<>
<PostHeader title={data.title} author={data.author} />
<PostBody body={data.body} />
<PostFooter likes={data.likeCount} comments={data.commentCount} />
</>
);
}
// GOOD: each child owns its fragment, re-renders independently
function PostHeader({ post }: { post: PostHeader_post$key }) {
const data = useFragment(graphql`
fragment PostHeader_post on Post {
title
author { name }
}
`, post);
// Only re-renders when title or author.name changes
}
function PostFooter({ post }: { post: PostFooter_post$key }) {
const data = useFragment(graphql`
fragment PostFooter_post on Post {
likeCount
commentCount
}
`, post);
// Only re-renders when like/comment counts change
}Use a single usePaginationFragment per component. Multiple connections in
one component make pagination state harder to reason about — cursor tracking,
loading states, and hasNext flags become tangled. Split each connection into
its own component instead.
After a mutation, let Relay's normalized store auto-update components by
spreading relevant fragments in the mutation response. Do not call refetch()
or fetchQuery() when the store update is sufficient.
# GOOD: updated data comes back with the mutation response
mutation UpdateUserMutation($input: UpdateUserInput!) {
updateUser(input: $input) {
user {
...UserProfile_user
...UserAvatar_user
}
}
}
# BAD: requires a separate round-trip after mutation
mutation UpdateUserMutation($input: UpdateUserInput!) {
updateUser(input: $input) {
user { id }
}
}Use fetchKey sparingly — changing it forces a full network round trip.
Reserve refetchQueries / manual refetch for cases where the mutation's side
effects are too broad to capture in the response payload.
Each fragment should request only the fields the component actually renders.
Do not add fields "just in case" — unused fields increase payload size and slow
down parsing and normalization. Relay's unused-fields lint rule catches this.
If a child component needs more data, add a fragment to the child and spread it in the parent — do not widen the parent's fragment.
© hackers-pub, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/relay-performance of hackers-pub/hackerspub.
Open the folder on GitHubat commit 7280aa7
Relay Performance 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Relay Performance this skillhackers-pub/hackerspub | 165 | — | ~2.2k | Automated safety check: Pass | AGPL-3.0 | |
| FastAPI-Redis SDK Developmentredis/fastapi-redis-sdk | 404 | — | ~2.5k | Automated safety check: Notes | MIT | |
| Nitro Server Toolkitantfu/skills | 5.9k | — | ~948 | Automated safety check: Pass | MIT | |
| Backend Servicesbiersoeckli/QuickStack | 362 | — | ~552 | Automated safety check: Pass | GPL-3.0 | |
| Dotnet Backend Patternswshobson/agents | 40k | 8 repos | ~6.6k | Automated safety check: Pass | MIT | |
| Springboot Patternsaffaan-m/ECC | 275k | 5 repos | ~2.5k | Automated safety check: Pass | MIT |
redis/fastapi-redis-sdk
Guides development on the fastapi-redis-sdk library itself - its connection lifecycle, dependency-injected caching, and async/sync bridging.
antfu/skills
Reference for Nitro v3, the server toolkit behind Nuxt: file routing, route rules, caching, storage, tasks, websockets and deployment presets.
biersoeckli/QuickStack
Create and update QuickStack backend services, adapters, standalone services, and server actions using the project's established singleton, adapter, caching, and error-handling patterns.
wshobson/agents
Master C/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications.
affaan-m/ECC
Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging.
giuseppe-trisciuoglio/developer-kit
Provides AWS Secrets Manager patterns for AWS SDK for Java 2.x, including secret retrieval, caching, rotation-aware access, and Spring Boot integration.
hackers-pub/hackerspub
GraphQL schema design and review. An agent skill from hackers-pub/hackerspub.
hackers-pub/hackerspub
Fill in missing translations in web-next .po files, add i18n-aware UI labels to components, and ensure translation quality — consistent glossary terminology, correct punctuation/typography per…
hackers-pub/hackerspub
Best practices for writing idiomatic Relay code. An agent skill from hackers-pub/hackerspub.
hackers-pub/hackerspub
Make a commit in Git with an appropriate commit message for the currently staged changes.
Categories
Performance best practices for Relay applications. An agent skill from hackers-pub/hackerspub. Relay Performance is an agent skill from hackers-pub/hackerspub. Performance best practices for Relay applications.
Relay Performance fits situations like: optimizing data fetching; reducing re-renders; configuring caching; improving time to first meaningful paint.
Run `npx skills add hackers-pub/hackerspub --skill relay-performance -a claude-code`. Or copy the skill folder (.agents/skills/relay-performance in hackers-pub/hackerspub) into .claude/skills/relay-performance in your project. Claude Code loads it when a task matches its description.
Run `npx skills add hackers-pub/hackerspub --skill relay-performance -a codex`. Or copy the skill folder (.agents/skills/relay-performance in hackers-pub/hackerspub) into .agents/skills/relay-performance in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hackers-pub/hackerspub --skill relay-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/relay-performance, .gemini/skills/relay-performance, .github/skills/relay-performance and .opencode/skills/relay-performance in your project.
SKILL.md names no scripts, command-line tools or credentials: Relay Performance is instructions for the agent only.
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.
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.
Relay Performance is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Relay Performance: FastAPI-Redis SDK Development (redis/fastapi-redis-sdk, 404 stars), Nitro Server Toolkit (antfu/skills, 5.9k stars), Backend Services (biersoeckli/QuickStack, 362 stars) and Dotnet Backend Patterns (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
hackers-pub (a GitHub organization) maintains it in hackers-pub/hackerspub, which has 165 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.
Source: hackers-pub/hackerspub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.