Chalk Labs
Need help deploying add-empty-error-states?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/acauhi99-add-empty-error-states
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/add-empty-error-states
What's inside
- Skill name
add-empty-error-states- Description
- Sibling to add-skeleton-loaders. After data fetching is wired in a route or component, verify and auto-fix the two non-loading states most often forgotten — empty (the request succeeded but returned zero items / null) and error (the request failed). Empty states get a clear message + primary call-to-action. Error states get a human-readable message + retry affordance + (in dev) a way to surface the actual error. Uses the project's existing UI primitives — shadcn `<EmptyState />` if present, project conventions otherwise. Does NOT cover loading skeletons. Trigger phrases — "add empty state", "what if this list is empty", "add error state", "handle the error case", "/add-empty-error-states", "error UI", "no results UI", any time a route was just wired with `useQuery` / `useSuspenseQuery` / loader. Skip for — pure static pages, mutations (useMutation has different patterns), modals/dialogs whose empty state is the parent's responsibility.
- License
- MIT
- Compatibility
- opencode
- Metadata
- source: Adapted from AgentSystemLabs/core (MIT) · requires_codegraph: true
- Instructions
- 194 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
> **Tool mapping (OpenCode):** This skill uses:
> - `question` tool for user prompts (not `AskUserQuestion`)
> - `task` tool for subagents (not `Agent` or `Task` subagent syntax)
> - `skill({ name: "..." })` to load other skills (not `Skill(skill="...", args="...")`)
> - `codegraph_explore`, `codegraph_search`, `codegraph_context` for codebase exploration (preferred)
> - `todowrite` for phase/progress tracking
> - `grep`, `glob`, `read`, `bash` as fallback when `.codegraph/` not initialized
>
> **Context rule:** This skill supersedes any prior skill instructions. Follow ONLY these instructions now. Read the user's goal and any mode/include/skip from the conversation context.
# Add Empty / Error States
A page in three states: loading, empty, error. The fast-path "data shows up" gets all the design attention; the other two get inherited from whatever the renderer falls back to. This skill catches both.
---
## Phase 1 — Locate Data-Fetching Surfaces
Use `todowrite` to mark this phase as in_progress.
In the file the user names (or the most recently edited route/component), find every:
- `useQuery(...)` / `useSuspenseQuery(...)` (TanStack Query)
- Route `loader` returning data the component reads
- `useFetcher` / `useLoaderData`
- Direct fetch + state (less common; flag if found)
For each, identify what's rendered with the result. The empty/error treatment goes wherever that result is consumed.
Prefer `codegraph_explore` with symbol names to trace the data flow; fall back to `grep` + `read` if `.codegraph/` not initialized. If `.codegraph/` not initialized, mention the user can run `codegraph init -i`.
**Exit:** every data-fetch surface and its render site are listed.
---
## Phase 2 — Per Fetch: Check the Three Branches
Use `todowrite` to mark this phase as in_progress.
For each fetch, verify the component handles all three of:
| Branch | Trigger | Treatment |
|---|---|---|
| Loading | first render before data resolves | Skeleton (handled by add-skeleton-loaders, out of scope here). |
| Empty | data resolved but is `null`, `undefined`, `[]`, or otherwise represents "nothing" | Empty state UI. |
| Error | query/loader threw or returned an error | Error state UI. |
For TanStack Query: check that `query.isPending` / `query.isError` / `query.data` are all reachable in the render. With `useSuspenseQuery`, errors are caught by the nearest `<ErrorBoundary>` and loading by `<Suspense>` — verify both boundaries exist on the route.
For loaders: check the route's `errorComponent` (TanStack Router) or equivalent; check `pendingComponent` for loading; the empty case must be handled in the route component itself.
**Exit:** for each fetch, mark Empty and Error as `OK`, `MISSING`, or `WEAK`.
---
## Phase 3 — Detect UI Primitives
Use `todowrite` to mark this phase as in_progress.
Search the codebase for an existing empty/error component. Prefer `codegraph_search` with query "EmptyState" or "ErrorState"; fall back to `grep` + `glob` if `.codegraph/` not initialized:
- `<EmptyState>` / `EmptyState.tsx` — shadcn-style pattern, common in this stack.
- Custom `<NoResults>` / `<ErrorBoundary>` / `<Empty>`.
- A pattern: a card with an icon, heading, body, and action button.
If a primitive exists, use it. If not, propose the smallest one that matches the project's component style — but flag this as a structural decision and let the user confirm via `question` tool before creating shared components.
**Exit:** for each missing/weak state, the component to use is identified.
---
## Phase 4 — Apply Fixes
Use `todowrite` to mark this phase as in_progress.
For each MISSING or WEAK state, apply the inline fix:
### Empty state pattern
```tsx
const { data: posts } = useQuery(postsQueryOptions())
if (posts.length === 0) {
return (
<EmptyState
icon={FileTextIcon}
title="No posts yet"
description="Create your first post to get started."
action={
<Button asChild>
<Link to="/posts/new">New post</Link>
</Button>
}
/>
)
}
```
The empty state must:
- Tell the user *what's empty* (specific to this surface — "No posts" not "No items").
- Tell the user *what to do* if action is available (CTA button), or explain *why it's empty* if no action applies.
- Use the same icon/spacing as other empty states in the codebase.
If the empty state means "nothing yet, never will be without action" → lead with the action. If it means "you've filtered everything out" → lead with "clear filters".
### Error state pattern
```tsx
if (query.isError) {
return (
<ErrorState
title="Couldn't load posts"
description="Something went wrong. Try again in a moment."
action={<Button onClick={() => query.refetch()}>Retry</Button>}
// In dev, surface the actual error:
details={import.meta.env.DEV ? String(query.error) : undefined}
/>
)
}From Acauhi99/opencode-agent-system, MIT.
More from Acauhi99/opencode-agent-system
- 0.502score
add-regression-test
Acauhi99
After a bug fix lands (or is staged), generate a regression test that fails on the pre-fix code and passes on the post-fix code — pinning the bug so it can't…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
add-e2e-test
Acauhi99
Add a Playwright end-to-end test for a user-facing flow — sign-in, form submit, multi-step wizard, payment, navigation, etc.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
address-pr-comments
Acauhi99
Address every unresolved review comment on a GitHub pull request — locate the PR (current branch, PR URL, PR number, or issue number with linked PR), fetch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
audit
Acauhi99
Whole-codebase tech-debt sweep.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
check-pr-readiness
Acauhi99
Pre-PR gauntlet — run the project's typecheck, linter, formatter, and test suite against the branch's diff vs.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
continue
Acauhi99
Resume and continue work from a previous session.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
fix-pr-tests
Acauhi99
Diagnose and fix failing CI tests on a GitHub pull request.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
handoff-opencode
Acauhi99
Hand off a stalled task or stubborn bug to the OpenCode CLI for a second pass — package the original request, what the agent tried, and the live `git status`…
SkillCFreshness: C★ 1Claude Code +9 - 0.472score
domain-modeling
Acauhi99
Build and sharpen a project's domain model.
SkillCFreshness: C★ 1Claude Code +9 - 0.267score
fix-bug
Acauhi99
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9 - 0.267score
add-migration
Acauhi99
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9 - 0.267score
add-observability
Acauhi99
No description from the publisher yet.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 24, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Acauhi99
- 0.502score
add-regression-test
Acauhi99
After a bug fix lands (or is staged), generate a regression test that fails on the pre-fix code and passes on the post-fix code — pinning the bug so it can't…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
address-pr-comments
Acauhi99
Address every unresolved review comment on a GitHub pull request — locate the PR (current branch, PR URL, PR number, or issue number with linked PR), fetch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
audit
Acauhi99
Whole-codebase tech-debt sweep.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
check-pr-readiness
Acauhi99
Pre-PR gauntlet — run the project's typecheck, linter, formatter, and test suite against the branch's diff vs.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
continue
Acauhi99
Resume and continue work from a previous session.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
handoff-opencode
Acauhi99
Hand off a stalled task or stubborn bug to the OpenCode CLI for a second pass — package the original request, what the agent tried, and the live `git status`…
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get add-empty-error-states running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
add-empty-error-states skill. Agent Mart. https://agentmart.dev/skills/acauhi99-add-empty-error-states (last updated 2026-10-24)