Agent skill

ai-feedback-coder

Process app feedback marked as 'ai_code' status. Fetches one feedback item from public.app_feedback, loads all fields and comments as context, presents implementation plan for approval, then routes to the right implementation skill (systematic-debugging, frontend-design, admin-panel-builder, etc.) based on the feedback type. Use when asked to "process ai feedback", "code feedback", "ai-koodaa palaute", or any variation of implementing feedback marked for AI coding.

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/Spectaculous-Code/raamattu-nyt/tree/main/.claude/skills/ai-feedback-coder

SKILL.md

AI Feedback Coder

Automates coding feedback items marked as ai_code in public.app_feedback.

Workflow

1. Query ai_code feedbacks

Use mcp__plugin_supabase_supabase__execute_sql with project ID iryqgmjauybluwnqhxbg:

sql
SELECT * FROM public.app_feedback
WHERE status = 'ai_code'
ORDER BY created_at ASC
LIMIT 1;

2. If none found

Report "No ai_code feedbacks remaining" and stop.

3. Count remaining

sql
SELECT count(*) FROM public.app_feedback WHERE status = 'ai_code';

4. Fetch comments

sql
SELECT * FROM public.feedback_comments
WHERE feedback_id = '<id>'
ORDER BY created_at ASC;

5. Build context block

Assemble all feedback fields into a structured context:

  • id, system_id, feedback_type, subject, message
  • satisfaction_rating, email, allow_contact
  • status, admin_notes, promoted_idea_id
  • page_url, user_agent, browser_history
  • kipina_id, created_at
  • All comments (message, is_internal, created_at)

The system_id field tells which app the feedback concerns — see src/lib/systems.ts for the app registry.

6. Announce and present plan

Tell the user:

Palaute: [subject or message truncated to ~80 chars] Tyyppi: [feedback_type] | Sovellus: [system_id] | Jaljella: N kpl

Suunnitelma:

  1. [Konkreettinen askel 1 — esim. "Muokkaa ComponentX.tsx: lisaa null-tarkistus"]
  2. [Konkreettinen askel 2]
  3. ...

Tiedostot joihin koskee: file1.tsx, file2.ts

MANDATORY — always present this plan and wait for user confirmation using the AskUserQuestion tool before proceeding.

Use AskUserQuestion with these options:

  • "Jatka" (description: "Toteuta suunnitelma sellaisenaan")
  • "Anna lisäohjetta" (description: "Muokkaa suunnitelmaa ennen toteutusta")
  • "Peruuta" (description: "Ohita tämä palaute, merkitse luetuksi")

Handle the response:

  • Jatka → proceed to step 7
  • Anna lisäohjetta → user types instructions via "Other" → adjust plan and re-present with AskUserQuestion again
  • Peruuta → mark feedback as read instead of fixed and stop
  • Other (free text) → treat as instructions, adjust plan and re-present

To build a good plan, use the Explore agent or Grep/Glob to find the relevant files before presenting. The plan should be concrete enough that the user can judge if the approach is correct.

7. Route to the right implementation skill

After user approves the plan, invoke the appropriate skill(s) directly based on what the feedback requires. Do NOT delegate to using-superpowers — route directly.

Routing table

Feedback concerns Invoke skill Context to pass
Bug / unexpected behavior systematic-debugging Error description, reproduction steps, page_url
UI / layout / component issue frontend-design Component name, expected vs actual behavior
Admin panel issue admin-panel-builder Admin page, tab, what's broken/missing
Database / RLS / migration needed supabase-migration-writer Table, operation, expected behavior
Edge Function issue edge-function-generator Function name, error, expected behavior
AI feature / prompt issue ai-prompt-manager Feature name, prompt, expected behavior
Idea Machina specific idea-machina Evolution stage, component, issue
Practice / gamification practice-gamification Practice type, scheduling, completion
New feature (general) brainstorming first, then implementation skill Full feedback context + plan
Type errors / Supabase types supabase-typing-architect File, type error, schema
i18n / translation language-specialist Missing key, language, component
Performance performance-auditor Slow query, component, metric

Multiple skills may apply. For example, a feature request may need brainstormingsupabase-migration-writerfrontend-design. Run them in sequence.

If the feedback doesn't clearly match any skill, use code-guru for general implementation guidance.

8. Update feedback status

MANDATORY — always run after implementation, even if implementation was partial:

sql
UPDATE public.app_feedback SET status = 'fixed' WHERE id = '<id>';

9. Add admin comment documenting what was done

MANDATORY — write a concise Finnish summary of every change made (files modified, features added, bugs fixed). This is the audit trail.

sql
INSERT INTO public.feedback_comments (feedback_id, user_id, message, is_internal)
VALUES (
  '<id>',
  COALESCE(
    (SELECT id FROM auth.users ORDER BY created_at ASC LIMIT 1),
    '<feedback-user_id>'
  ),
  'AI-toteutettu: <1-3 lauseen yhteenveto tehdyistä muutoksista, esim. "Korjattu sidebar-komponentin renderöintiongelma. Muokattu sidebar.tsx: lisätty null-tarkistus props-arvoille.">',
  true
);

The comment message must include:

  • What was changed (file names or component names)
  • Why (link back to the feedback problem)
  • Keep it under 300 characters

10. Report and continue

Report the final count, then use AskUserQuestion to offer continuing:

  • "Seuraava" (description: "Hae ja käsittele seuraava ai_code-palaute") — this must be the first option so Enter accepts it
  • "Lopeta" (description: "Lopeta palautekierros")

If user picks "Seuraava", go back to step 1. If "Lopeta", stop.

Data Models

app_feedback (public schema)

Field Type Notes
id uuid PK
user_id text nullable
system_id text e.g. 'raamattu-nyt', 'idea-machina'
feedback_type text 'bug', 'feature', 'general', 'question'
subject text nullable
message text required
satisfaction_rating int 1-5, nullable
email text nullable
allow_contact boolean
status text 'new', 'read', 'handled', 'fixed', 'ai_fix', 'ai_code', 'idea', 'idea_implemented'
admin_notes text nullable
promoted_idea_id text nullable, FK to feature_suggestions
kipina_id text nullable
page_url text nullable
user_agent text nullable
browser_history jsonb nullable
created_at timestamptz

feedback_comments (public schema)

Field Type Notes
id uuid PK
feedback_id uuid FK to app_feedback.id
user_id text
message text
is_internal boolean
created_at timestamptz

Configuration

  • Supabase project ID: iryqgmjauybluwnqhxbg
  • Tool: mcp__plugin_supabase_supabase__execute_sql

Expand your agent's capabilities with these related and highly-rated skills.

Spectaculous-Code/raamattu-nyt

docs-updater

Expert assistant for keeping documentation synchronized with code changes in the KR92 Bible Voice project. Use when updating API docs, maintaining architecture diagrams, syncing README, updating CLAUDE.MD, or generating documentation from code.

0 0
Explore
Spectaculous-Code/raamattu-nyt

ai-prompt-manager

Expert assistant for managing AI prompts, features, and configuration in the KR92 Bible Voice AI system. Use when creating AI prompts, configuring AI features, managing prompt versions, setting up AI bindings, or working with AI pricing and models.

0 0
Explore
Spectaculous-Code/raamattu-nyt

performance-auditor

Expert assistant for monitoring and optimizing performance in the KR92 Bible Voice project. Use when analyzing query performance, optimizing database indexes, reviewing React Query caching, monitoring AI call costs, or identifying N+1 queries.

0 0
Explore
Spectaculous-Code/raamattu-nyt

edge-function-generator

Expert assistant for creating and maintaining Supabase Edge Functions for the KR92 Bible Voice project. Use when creating Edge Functions, setting up CORS, integrating shared modules, adding JWT validation, or configuring environment variables.

0 0
Explore
Spectaculous-Code/raamattu-nyt

admin-panel-builder

Expert assistant for creating and maintaining admin panel pages in the KR92 Bible Voice project. Use when creating admin pages, building admin components, integrating with admin navigation, or adding admin features.

0 0
Explore
Spectaculous-Code/raamattu-nyt

lint-fixer

Expert assistant for analyzing and fixing linting and formatting issues in the KR92 Bible Voice project using Biome and TypeScript. Use when fixing lint errors, resolving TypeScript issues, applying code formatting, or reviewing code quality.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results