agentsclimarketplace

Run3 write single page web app files

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-claude-sonnet-4-6/stock-data-visualization/run3_write-single-page-web-app-files

Use when generating all files for a single-page web app: index.html, CSS, and JS. Ensures correct relative paths, proper script loading order, and valid HTML structure.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run3_write-single-page-web-app-files

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.5 KB, 688 tokens by cl100k_base, as published. Nobody here has run it

Writing Single-Page Web App Files

File Writing Pattern

def write_file(path, content):
    os.makedirs(os.path.dirname(path), exist_ok=True)
    with open(path, 'w', encoding='utf-8') as f:
        f.write(content)
    print(f"Written: {path} ({len(content)} bytes)")

index.html Structure

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Stock Visualization</title>
  <link rel="stylesheet" href="css/style.css">
</head>
<body>
  <div id="app">
    <div id="bubble-chart"></div>
    <div id="stock-table">
      <table>
        <thead>
          <tr>
            <th>Ticker Symbol</th>
            <th>Full Company Name</th>
            <th>Sector</th>
            <th>Market Cap</th>
          </tr>
        </thead>
        <tbody id="table-body"></tbody>
      </table>
    </div>
  </div>
  <!-- Tooltip div at body level for correct absolute positioning -->
  <div class="tooltip" id="tooltip"></div>
  <!-- Scripts at end of body -->
  <script src="js/d3.v6.min.js"></script>
  <script src="js/visualization.js"></script>
</body>
</html>

CSS Layout for Side-by-Side

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: sans-serif; background: #f9f9f9; }

#app {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  min-height: 100vh;
}

#bubble-chart {
  flex: 0 0 auto;
  width: 700px;
}

#stock-table {
  flex: 1 1 auto;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

#stock-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

#stock-table th, #stock-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

#stock-table th {
  background: #37474f;
  color: #fff;
  position: sticky;
  top: 0;
}

#table-body tr:hover { background: #f0f0f0; cursor: pointer; }
#table-body tr.highlighted { background-color: #ffe082; font-weight: bold; }

Relative Paths Rule

  • From index.html at /root/output/index.html, use js/, css/, data/ (no leading slash)
  • From visualization.js at /root/output/js/visualization.js, data paths must be ../data/...

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.