xiaohongshu
xiaohongshu
limacharlie-reporting
Use this skill when users need interactive HTML reports, dashboards, charts, or visualizations for LimaCharlie data. You generate the HTML, this skill serves it on localhost.
Full skill instructions
This skill lets you create rich, interactive HTML reports that open in a browser instead of displaying in the terminal. You generate whatever HTML you want - tables, charts, dashboards, visualizations - and this skill serves it on localhost.
Use this when users want:
Three simple steps:
create_and_serve_report(html) - This spawns Python's http.server as a background subprocessThe implementation uses Python's built-in http.server module running as a subprocess, serving files directly from /tmp. This approach is simple, reliable, and requires no complex threading or process management. You have complete freedom to generate whatever HTML makes sense.
import sys
sys.path.insert(0, '/full/path/to/skills/limacharlie-reporting')
from lib import create_and_serve_report
# Generate your HTML however you want
html = """
<h1>My Report</h1>
<p>Some analysis here...</p>
<table>
<tr><th>Metric</th><th>Value</th></tr>
<tr><td>Sensors</td><td>45</td></tr>
<tr><td>Cost</td><td>$1,234</td></tr>
</table>
"""
# Serve it
url = create_and_serve_report(html, title="My Report")
print(f"\nReport ready: {url}")
The URL will be something like http://localhost:8080/report-abc123.html.
Chart.js is a simple, popular charting library. Here's how to use it:
html = """
<h1>Billing Trend</h1>
<canvas id="myChart" width="400" height="200"></canvas>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js"></script>
<script>
const ctx = document.getElementById('myChart');
new Chart(ctx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr'],
datasets: [{
label: 'Monthly Cost ($)',
data: [800, 950, 1100, 1234],
borderColor: 'rgb(75, 192, 192)',
tension: 0.1
}]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: 'Cost Trend'
}
}
}
});
</script>
"""
url = create_and_serve_report(html, title="Billing Dashboard")
Chart.js Quick Reference:
type: 'line'type: 'bar'type: 'pie' or type: 'doughnut'For sortable, filterable tables, you can generate simple HTML tables or use libraries like DataTables:
# Simple HTML table (users can still sort/filter in browser with Ctrl+F)
html = """
<h1>Sensor Inventory</h1>
<table border="1" style="width:100%; border-collapse: collapse;">
<thead>
<tr style="background: #f0f0f0;">
<th>Hostname</th>
<th>Platform</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr><td>web-01</td><td>linux</td><td>online</td></tr>
<tr><td>db-01</td><td>linux</td><td>online</td></tr>
<tr><td>win-dc01</td><td>windows</td><td>offline</td></tr>
</tbody>
</table>
"""
url = create_and_serve_report(html, title="Sensors")
You can include CSS inline or link to frameworks:
html = """
<style>
.metric-card {
display: inline-block;
padding: 20px;
margin: 10px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: 8px;
text-align: center;
}
.metric-value {
font-size: 2em;
font-weight: bold;
}
</style>
<h1>Overview</h1>
<div class="metric-card">
<div class="metric-value">$1,234</div>
<div>Total Cost</div>
</div>
<div class="metric-card">
<div class="metric-value">45</div>
<div>Active Sensors</div>
</div>
"""
url = create_and_serve_report(html, title="Dashboard")
You can use any JavaScript library from a CDN:
Just include the CDN script tag and use the library's API in your HTML.
create_and_serve_report(html_content, title="Report", filename=None, wrap=True, include_chart_js=False)Parameters:
html_content (str): Your HTML contenttitle (str): Page title (used if wrap=True)filename (str, optional): Custom filename (e.g., "billing" → "billing.html")wrap (bool): If True, wraps content in minimal HTML template. If False, uses content as complete HTML document.include_chart_js (bool): If True (and wrap=True), automatically includes Chart.js CDN scriptReturns:
http://localhost:8080/report-abc123.html)wrap_html(content, title, include_chart_js=False)Wraps your content in a minimal HTML document with basic styling. Called automatically if wrap=True in create_and_serve_report.
import sys
sys.path.insert(0, '/full/path/to/skills/limacharlie-reporting')
from lib import create_and_serve_report
# Assume we fetched billing data from LimaCharlie MCP
total_cost = 1234.56
services = [
{'name': 'Detection & Response', 'cost': 500.00},
{'name': 'Artifact Collection', 'cost': 300.00},
{'name': 'Outputs', 'cost': 434.56}
]
# Generate HTML with inline Chart.js
html = f"""
<h1>Billing Dashboard</h1>
<p>Current billing cycle: <strong>${total_cost:,.2f}</strong></p>
<h2>Cost by Service</h2>
<canvas id="costChart" width="400" height="200"></canvas>
<h2>Service Breakdown</h2>
<table border="1" style="width:100%; border-collapse: collapse;">
<thead>
<tr style="background: #f0f0f0;">
<th>Service</th>
<th>Cost</th>
</tr>
</thead>
<tbody>
{''.join(f'<tr><td>{s["name"]}</td><td>${s["cost"]:,.2f}</td></tr>' for s in services)}
</tbody>
</table>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js"></script>
<script>
new Chart(document.getElementById('costChart'), {{
type: 'doughnut',
data: {{
labels: {[s['name'] for s in services]},
datasets: [{{
data: {[s['cost'] for s in services]},
backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56']
}}]
}},
options: {{
responsive: true,
plugins: {{
title: {{ display: true, text: 'Cost Distribution' }}
}}
}}
}});
</script>
"""
url = create_and_serve_report(html, title="Billing Report")
print(f"\n✅ Billing report ready: {url}")
<style> tags for self-contained reportsPort already in use:
lsof -i :8080-8090Charts not rendering:
Report URL doesn't open:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience