report-html
สร้างไฟล์ HTML ไฟล์เดียวแบบโต้ตอบได้สำหรับรายงานบนเบราว์เซอร์ พร้อมตาราง, dropdown, sort/filt...
SKILL.mdreport-html/SKILL.md
GitHubGoal
Create a single HTML file that presents a project analysis, an analysis, or a feature plan in the browser. The report supports interactive tables with sort, filter, group, and search, plus per-row dropdowns, theme toggling, and a sticky navigation menu
Scope
- Create one self-contained
.htmlfile that needs no build - Use Tailwind CSS via CDN, and Vue 3 where interactivity is needed
- Include a table that can sort, filter, group, and search
- Each table row can expand into a dropdown with extra columns
- The report body is in English; table cell content may use the project's language
Execute
1. Prepare Data
Goal: Have clean, structured data before rendering
- Run
/deep-analyzeor the main skill that produced the data (e.g./idea-features) - Convert the result into a JavaScript array of objects or 2D arrays
- Ensure each row has a unique
idand every required field - Add computed fields for
groupandsearchTextif needed
2. Build HTML Shell
Goal: a single file that loads all assets from CDN
- Use
<!DOCTYPE html>,<html lang="en">,<meta charset="UTF-8"> - Load Tailwind CSS:
https://cdn.tailwindcss.com - For interactive mode, load Vue 3:
https://unpkg.com/vue@3/dist/vue.global.js - Set
tailwind.config = { darkMode: 'class' } - Create
<div id="app">and a<script>block usingVue.createApp
3. Add Header And Theme Toggle
Goal: a clear header with dark/light mode
- Show the report title and a short description
- Add a theme toggle button that switches the
darkclass on<html> - Save the preference in
localStorage - Read
prefers-color-schemeon load - Use clear status indicators (e.g. badge or icon) for the report type
4. Add Sticky Tabs And Key Findings
Goal: a top-level navigation menu and summary
- Build a sticky tab bar with
position: sticky; top: 0 - Use
backdrop-blurand contrasting backgrounds - The first tab shows
Key Findingscards in a responsive grid - Each tab has a badge showing its item count
- Keep a clear visual hierarchy: title > subtitle > key findings > tabs
5. Build Interactive Table
Goal: the table supports rich interaction
- Render the table from the data array using
v-for - Add a search box bound with
v-model - Add filter chips for
Priority,Impact,Phase,Effort - Add sort controls on column headers (click to toggle asc/desc)
- Add a group-by option (e.g. group by
PhaseorPriority) - Add a
Clearbutton whenever a filter is active - Show the
No resultsempty state when filters return zero rows - Use a computed
filteredRowsfor sort/filter/group/search
6. Add Per-Row Dropdown
Goal: each row can expand to show extra detail
- Add an expand/collapse arrow on each row
- When expanded, show a dropdown panel below the row
- The dropdown has at least two columns (e.g.
UX/UI SketchandPlan) - Keep content concise; use
preorulfor sketches and plans - Allow only one expanded row at a time if it improves UX
7. Add Summary And Diagrams
Goal: non-table analysis results are visible too
- Add summary sections for DB/Files, API/Functions, Components
- Add text-based UX/UI sketches and architecture diagrams
- Keep diagrams in
<pre>blocks with a monospace font - Use cards and grids for summaries, not plain lists
8. Add Next Action
Goal: the report ends with clear recommendations
- Add a
Next Actionsection at the bottom - Use a numbered or bulleted list
- Reference the highest-importance items by
# - Style the next actions with a distinct background or border
9. Open In Browser
Goal: verify the report renders correctly
- Save the file as
reports/<report-name>.htmlor.devin/reports/<report-name>.html - Run
/open-weborStart-Process <path>to open it in the browser - Confirm the tabs, theme, sort, filter, and dropdowns work
Rules
1. Single Self-Contained File
- No build step, no external package installation
- All JS/CSS loaded from CDN
- Data embedded in
<script> - File size below 500 KB when possible
2. Report Body Language
- Headers, findings, summaries, diagrams, and next actions are in English
- Table cell content may be in the project's language (e.g. Thai)
- Never mix languages within the same paragraph
3. Table Interactivity
- Text search across every visible column
- Filter by
Priority,Impact,Phase,Effort,Difficult - Sort by any column (toggle asc/desc)
- Group rows by the selected column
- A button to clear filters
- Highlight active filter/sort states
- Show an empty state when no rows match
4. Per-Row Dropdown
- Each row has an expand button or a clickable row
- The expanded panel has at least two labeled columns
- For
/idea-featuresoutput the columns should beUX/UI SketchandPlan - Dropdown content uses concise text or code blocks
5. Design Tokens And Visual Hierarchy
- Define a small design token set with CSS variables for brand, success, warning, danger, and neutral colors
- Use a consistent spacing scale:
4,8,12,16,24,32,48 - Keep the font stack:
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif - Use
text-smfor tables,text-basefor content,text-2xlfor page titles - Avoid more than 6 accent colors
6. UX/UI Improvements
- Rounded corners (
rounded-lgfor cards,roundedfor buttons/badges) - Subtle shadows (
shadow-smfor cards,shadowfor the sticky header) - A sticky tab bar with
backdrop-blur - A sticky table header (
sticky top-0 z-10) on wide tables - Row hover states with
hover:bg-gray-50 dark:hover:bg-gray-700/50 - Alternating row colors are optional but must preserve contrast
- Status colors: red for high/danger, yellow for medium/warning, green for low/success, blue for info
- Use badges/pills for
Priority,Phase,Impact,Effort - Group headers distinct from rows (background + bold)
- Summary cards in a responsive grid (
grid-cols-1 md:grid-cols-3)
7. Responsive And Accessible
- Horizontal scrolling for wide tables (
overflow-x-auto) - On small screens, stack filters and tabs vertically
- Use
focus:outline-none focus:ring-2 focus:ring-blue-500for focusable elements - Never convey meaning by color alone; add text or an icon
- Use
aria-labelon icon-only buttons - Respect
prefers-reduced-motion - Guarantee sufficient color contrast in both light and dark modes
8. Empty, Loading, And Error States
- Show a friendly
No resultsmessage when filters match nothing - Show a
Loading...fallback while Vue initializes (usev-cloak) - Include a
Reset filtersbutton in the empty state - If data is missing, show a clear message instead of a broken table
9. Micro-Interactions
- Highlight the active sort column
- Show a count badge on the active tab
- Animate row expansion with a simple
max-heighttransition (respectprefers-reduced-motion) - Use subtle hover transitions for buttons and rows
- Show
CopiedorSavedfeedback for any copy/export
10. Print And Share
- Add a print-friendly CSS block:
- Hide the sticky tab bar, theme toggle, and filters
- Expand all dropdown rows automatically
- Use black text on a white background
- Keep URLs and code blocks readable when printed
11. Safety
No hardcoded secrets, credentials, or sensitive paths
Use relative paths for project files
Sanitize user-provided content before injecting it into HTML
Use
DOMPurifywhen rendering HTML from untrusted sourcesFinal report via
/report-review— one chat table (No./Action/Evidence/Severity/Risk/Priority/Owner skill/Status); the single-file HTML is this skill's artifact, produced only when the user asks for HTML explicitly
Expected Outcome
- A single
.htmlfile saved in the project - Report body in English, table cells in the project's language when needed
- An interactive table with sort, filter, group, search, and sticky headers
- Per-row dropdowns with two columns
- Theme toggle, sticky tabs, key findings, summaries, diagrams, next actions
- Responsive, accessible, and print-friendly
- Clear empty/loading/error states
- The file opens in the browser and renders correctly