Agent skill

Add Query

by ecency in ecency/vision-mobile

A skill your agent uses when reading server data in the mobile app - wiring an @ecency/sdk query option into a screen, adding or editing a hook under src/providers/queries/, paginating a feed or…

MITAuto-check passedMobile

Install Add Query

skills CLI
$ npx skills add ecency/vision-mobile --skill add-query -a claude-code

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

GitHub CLI
$ gh skill install ecency/vision-mobile add-query --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/ecency/vision-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-query .claude/skills/add-query && 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
add-query
GitHub stars
262
Token cost
~1.8k tokens
SKILL.md length
557 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when reading server data in the mobile app - wiring an @ecency/sdk query option into a screen, adding or editing a hook under src/providers/queries/, paginating a feed or…

  • Works in 7 steps: Straight from a component → App hook that adds mobile-only options → Private-API queries need the auth pair → …
  • Reading server data in the mobile app - wiring an @ecency/sdk query option into a screen
  • SKILL.md covers Rule: the SDK owns the fetch, 1. Straight from a component, 2. App hook that adds… and 3. Private-API queries need…, plus 5 more sections
  • Calls yarn

What it does

Add Query is an agent skill from ecency/vision-mobile. Use when reading server data in the mobile app - wiring an @ecency/sdk query option into a screen, adding or editing a hook under src/providers/queries/, paginating a feed or list with an infinite query, or fixing a query key, enabled guard, or cache persistence problem.

Its SKILL.md is about 1.8k 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 Mobile. The repository describes itself as: Ecency Mobile - reimagined social blogging, contribute and get rewarded (for Android and iOS). The licence is MIT.

When your agent uses it

  • Reading server data in the mobile app - wiring an @ecency/sdk query option into a screen
  • Editing a hook under src/providers/queries/
  • Paginating a feed
  • List with an infinite query

Example prompts

  • “/add-query”

Workflow steps

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

  1. Straight from a component
  2. App hook that adds mobile-only options
  3. Private-API queries need the auth pair
  4. Infinite queries
  5. Query keys
  6. Hand-rolled query (last resort)
  7. Export

What it can do on your machine

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

    • yarn

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

  • Network

    No URLs in SKILL.md. Its commands use yarn, which can reach the network depending on how they are called.

    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

Add Query loads about 1.8k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 557 words of instructions outside code blocks.

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

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 ecency/vision-mobile at commit feef7d1, republished under its MIT licence (© ecency). 557 words, ~1,787 tokens.

Download SKILL.mdSave it as .claude/skills/add-query/SKILL.md (or your agent's skills folder).
name
add-query
description
Use when reading server data in the mobile app - wiring an @ecency/sdk query option into a screen, adding or editing a hook under src/providers/queries/, paginating a feed or list with an infinite query, or fixing a query key, enabled guard, or cache persistence problem.
argument-hint
query-name

Add Query

Read CLAUDE.md first (State Management, SDK Migration). Writes are a separate skill: add-mutation.

Rule: the SDK owns the fetch

@ecency/sdk exports a large family of get*QueryOptions helpers. Most files under src/providers/queries/ import from @ecency/sdk; a bare queryFn: is rare in that directory. Search the SDK for your own domain first. Write a queryFn only when that search comes back empty:

bash
D=node_modules/@ecency/sdk/dist/browser/index.d.ts
test -f "$D" || echo 'SDK not installed, run yarn'   # a missing file greps as empty, a false all-clear
grep -o "get[A-Za-z]*QueryOptions" "$D" | sort -u | grep -i draft   # swap in your domain
grep -n "declare function getPostQueryOptions" "$D"

Drop the trailing | grep -i draft to list them all. The last grep gives the real argument order. Do not guess it. In the call sites here, getPostQueryOptions takes the observer third.

1. Straight from a component

typescript
import { useQuery } from '@tanstack/react-query';
import { getPostQueryOptions, getAccountFullQueryOptions } from '@ecency/sdk';

const observer = currentAccount?.name;
const { data: post, isLoading } = useQuery(getPostQueryOptions(author, permlink, observer));
const { data: account } = useQuery(getAccountFullQueryOptions(author));

2. App hook that adds mobile-only options

The dominant shape: spread the SDK options, then override. Verbatim, src/providers/queries/leaderboardQueries/leaderboardQueries.ts:

typescript
import { useQuery } from '@tanstack/react-query';
import { getDiscoverLeaderboardQueryOptions } from '@ecency/sdk';

/** hook used to return leaderboard data using SDK */
export const useGetLeaderboardQuery = (duration: 'day' | 'week' | 'month') => {
  return useQuery({
    ...getDiscoverLeaderboardQueryOptions(duration),
    // Opted in explicitly: the client default is off, because waking every query in
    // the cache on every resume is far more than this needs. The board lives inside a
    // tab that stays mounted, so without this it shows whatever it fetched hours ago
    // until the user thinks to pull to refresh.
    refetchOnWindowFocus: true,
  });
};

Usual overrides: enabled, select, staleTime, gcTime, initialData. Keep the SDK's queryKey plus queryFn so the cache entry stays shared with other surfaces.

3. Private-API queries need the auth pair

Ecency backend queries take username plus an access token. Use useAuth() rather than re-deriving it. From src/providers/queries/newsletterQueries.ts:

typescript
import { useAuth } from '../../hooks';

export const useDigestSubscriptionsQuery = () => {
  const { username, code } = useAuth();
  return useQuery(getDigestSubscriptionsQueryOptions(username, code));
};

4. Infinite queries

SDK get*InfiniteQueryOptions already carry initialPageParam plus getNextPageParam. The repo rarely hand-rolls those two. Flatten in the hook, do not re-key. From src/providers/queries/draftQueries.ts (comments stripped):

typescript
const { username, code } = useAuth();
const enabled = !!username && !!code;

const infiniteQuery = useInfiniteQuery({
  ...getDraftsInfiniteQueryOptions(username ?? '', code ?? '', limit),
  enabled,
});

const data = useMemo(() => {
  if (!infiniteQuery.data?.pages) return [];
  return infiniteQuery.data.pages.flatMap((page) => page.data);
}, [infiniteQuery.data?.pages]);

return { ...infiniteQuery, data, pagesLoaded: infiniteQuery.data?.pages?.length ?? 0 };

5. Query keys

  • SDK keys: import { QueryKeys } from '@ecency/sdk'. Namespaced factories, not strings: QueryKeys.posts.draftsInfinite(username, limit), QueryKeys.accounts.full(name), QueryKeys.polls.details(author, permlink). Use these to invalidate or seed an SDK cache entry.
  • Mobile-only keys: src/providers/queries/queryKeys.ts is a default export named QUERIES with a nested shape. Files import that default (import QUERIES from '<relative>/queryKeys', so the specifier depends on the file) then queryKey: [QUERIES.WALLET.GET_ACTIVITIES, username]. There is no local QueryKeys export.

6. Hand-rolled query (last resort)

Only when the SDK has nothing. Verbatim, src/providers/queries/settingsQueries.ts:

typescript
export const useGetServersQuery = () => {
  return useQuery<string[]>({
    queryKey: [QUERIES.SETTINGS.GET_SERVERS],
    queryFn: getNodes,
    placeholderData: [...SERVER_LIST],
    staleTime: 0,
  });
};

getNodes comes from src/providers/ecency/ecency.ts, a provider module, not a bare fetch.

7. Export

src/providers/queries/index.ts uses export * from './<domain>Queries'. It also re-exports getQueryClient from the SDK; the rest of the file is local (initQueryClient plus the persistence allowlist). A subdirectory carries its own index.ts that re-exports namespaces.

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

Gotchas

  1. Persistence is an allowlist. _shouldDehydrateQuery in src/providers/queries/index.ts switches on queryKey[0], then narrows on queryKey[1]. A namespace with no case falls to the default and is dropped, so a new namespace is not persisted until you add its case. Within a case the subtype handling differs per namespace: some subtypes are dropped, some persist only while a single page is loaded, some persist wholesale. Read the switch before assuming a new key persists.
  2. Guard with enabled when a param can be undefined. An undefined anywhere in a query key also blocks persistence.
  3. Returning undefined from getNextPageParam stops pagination; that is what the repo's hand-rolled case returns.
  4. Optimistic vote data is no longer Redux. Call updateVoteInQueryCaches() and read back via applyRecentVoteOverrideToEntry() from src/providers/queries/postQueries/voteCacheUtils.ts; seed a post before navigation with usePostsCachePrimer(). useInjectVotesCache is gone, though CLAUDE.md's Post Data Flow still lists it.
  5. Non-React code: import getQueryClient from the app barrel providers/queries rather than the SDK: await queryClient.fetchQuery(getAccountsQueryOptions([username])).
  6. src/providers/queries/sdk-config.ts runs from initQueryClient() and configures ConfigManager (query client, private API host, image host, Hive nodes, DMCA lists). Adding a query rarely requires touching it.

Prettier width is 100 (.prettierrc). Finish with yarn lint, yarn typecheck plus yarn test:ci; .github/workflows/test.yml runs all three on every PR. The baseline in tsc-baseline.json is empty, so any type error fails. Two co-located tests in src/providers/queries/ read index.ts and assert the export * from './<domain>Queries'; line from section 7, so a missing barrel export fails jest.

© ecency, 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 .claude/skills/add-query of ecency/vision-mobile.

Open the folder on GitHubat commit feef7d1

Compare with similar skills

Add Query 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.

Add Query compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Query this skillecency/vision-mobile262—~1.8kAutomated safety check: PassMIT
React Native Best Practicesvercel-labs/openreview1.7k17 repos~1.1kAutomated safety check: PassMIT
Swiftui Protwostraws/SwiftUI-Agent-Skill5.1k2 repos~1.5kAutomated safety check: PassMIT
Kortix Brandkortix-ai/suna20k—~4kAutomated safety check: PassCustom licence
Ip As LogoKartikLabhshetwar/better-shot2.4k1 repos~4.3kAutomated safety check: PassMIT
Compose Multiplatform Patternsmonta-app/ocpp-emulator1805 repos~2kAutomated safety check: PassApache-2.0

Similar skills

  • React Native Best Practices

    vercel-labs/openreview

    Official

    A prioritized rule set for React Native and Expo apps covering list performance, animation, navigation, UI patterns, state, rendering, monorepos and configuration.

    1.7k GitHub starsUsed in 17 repos~1.1k tokens
    MobileAuto-check passed
  • Swiftui Pro

    twostraws/SwiftUI-Agent-Skill

    Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.

    5.1k GitHub starsUsed in 2 repos~1.5k tokens
    MobileAuto-check passed
  • Kortix Brand

    kortix-ai/suna

    Load FIRST for anything that carries the Kortix look or voice: product or mobile UI, copy of any kind, decks, social, images, email, CLI output, anything with the logo, and reviews of these.

    20k GitHub stars~4k tokensUpdated today
    MobileAuto-check passed
  • Ip As Logo

    KartikLabhshetwar/better-shot

    Generate extremely simple, cute, personified square character images with rounded heavy forms, two purposeful character colors, one solid background color, and a dominant lower-corner composition.

    2.4k GitHub starsUsed in 1 repo~4.3k tokens
    MobileAuto-check passed
  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    180 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Aso Appstore Screenshots

    adamlyttleapps/claude-skill-aso-appstore-screenshots

    Generate high-converting App Store screenshots by analyzing your app's codebase, discovering core benefits, and creating ASO-optimized screenshot images using Nano Banana Pro.

    1.8k GitHub starsUsed in 1 repo~9.6k tokens
    MobileAuto-check passed

More from ecency/vision-mobile

  • Add Feature

    ecency/vision-mobile

    A skill your agent uses when adding a new screen, route, or user-facing feature to the Ecency mobile React Native app, covering navigator registration, route params, i18n strings and styling.

    262 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Add Mutation

    ecency/vision-mobile

    A skill your agent uses when adding, wrapping, or calling an @ecency/sdk mutation hook in the mobile app (Hive broadcasts like transfer, follow, vote, delegate, community, engine token, or points)

    262 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Add Sheet

    ecency/vision-mobile

    A skill your agent uses when adding, registering, or debugging a bottom sheet (action sheet) in the mobile app, including when a sheet's cancel or dismissal reaches the caller as the wrong result.

    262 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Code Review

    ecency/vision-mobile

    Review a vision-mobile React Native change (diff, branch, PR or file) against this repo's own traps and conventions: action sheet return values, setNativeProps caret, safe-area edges, editor…

    262 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Debug

    ecency/vision-mobile

    Diagnose a bug in the Ecency mobile app when a broadcast or login fails, a wallet or transfer amount is wrong, a screen or deep link does not open, a bottom sheet misbehaves, dark mode colors are…

    262 GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Add Query

What does Add Query do?

A skill your agent uses when reading server data in the mobile app - wiring an @ecency/sdk query option into a screen, adding or editing a hook under src/providers/queries/, paginating a feed or…. Add Query is an agent skill from ecency/vision-mobile. Use when reading server data in the mobile app - wiring an @ecency/sdk query option into a screen, adding or editing a hook under src/providers/queries/, paginating a feed or list with an infinite query, or fixing a query key, enabled guard, or cache persistence problem.

When should I use Add Query?

Add Query fits situations like: reading server data in the mobile app - wiring an @ecency/sdk query option into a screen; editing a hook under src/providers/queries/; paginating a feed; list with an infinite query.

How do I install Add Query in Claude Code?

Run `npx skills add ecency/vision-mobile --skill add-query -a claude-code`. Or copy the skill folder (.claude/skills/add-query in ecency/vision-mobile) into .claude/skills/add-query in your project. Claude Code loads it when a task matches its description.

How do I install Add Query in Codex?

Run `npx skills add ecency/vision-mobile --skill add-query -a codex`. Or copy the skill folder (.claude/skills/add-query in ecency/vision-mobile) into .agents/skills/add-query in your project. Codex loads it when a task matches its description.

Can I use Add Query 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 ecency/vision-mobile --skill add-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-query, .gemini/skills/add-query, .github/skills/add-query and .opencode/skills/add-query in your project.

What does Add Query need to run?

Going by SKILL.md and its folder, Add Query needs the command-line tools its instructions call (yarn).

Does Add Query 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 Add Query 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 Add Query use?

Add Query 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 Add Query use?

About 1.8k tokens (SKILL.md is roughly 7.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 Add Query?

Skills that share tags, products or a category with Add Query: React Native Best Practices (vercel-labs/openreview, 1.7k stars), Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5.1k stars), Kortix Brand (kortix-ai/suna, 20k stars) and Ip As Logo (KartikLabhshetwar/better-shot, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Query?

ecency (a GitHub organization) maintains it in ecency/vision-mobile, which has 262 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 5, 2026.

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