PTENES
MODULE 3.4

🖥️ Build your own "operating system" for Claude Code

The bonus module / capstone. You bring together everything you’ve learned in a layer that gives you an overview: a root folder, a CLAUDE.md master and an HTML dashboard that reads your data and shows projects, skills, agents, and costs at a glance.

6
Topics
~60
Minutes
Intermediate
Level
Capstone
Type
0% 0 of 6
📁 meu-os/ 📋 CLAUDE.md 📁 projects/ 📁 skills/ · agents/ 📁 knowledge/ 📁 data/ (JSON) 🖥️ painel/index.html 🖥️ Dashboard — my OS 📁 Projects7 🧩 Skills/Agents21 ⛽ Monthly costunderused pointer showing low usage—a sign to reassess the plan Your system, your dashboard — start small and grow as needed. (illustrative)

Detailed content

1

🗺️ What is a "personal OS" for AI

As you use Claude Code, things multiply: several projects, dozens of skills, specialized agents, multiple subscriptions. At some point, you lose sight of the big picture. The "personal operating system" is the layer that gives you that view—and it’s not a product you buy, but an arrangement of simple things you put together yourself.

What it is:

Root folder + CLAUDE.md master + visual dashboard that gives you a unified view of your Claude Code usage.

Why learn:

Without this layer, every project is an island; you don't know how many skills you have or how much you're spending. With it, you operate with a map instead of in the dark.

Key concepts:

Dashboard · single source of truth · system = data + visualization (not a closed app) · “start small and grow.”

🚗 The car dashboard analogy

You don't look inside the engine all the time—you check the dashboard: speed, fuel, temperature. Your AI dashboard does the same: how many active projects, which skills exist, how much you spent this month, which subscription is underused.

📌 The bulletin board analogy

O CLAUDE.md master is the board at the entrance: everyone who arrives reads it first. It says where things are and what the rules are. The HTML dashboard is the “showcase” for that board—the polished, clickable version.

⭐ The golden rule

The system is yours—so start small and grow as needed. Don’t try to recreate a feature-packed dashboard on day 1. Build the structure, one CLAUDE.md master and a page that shows three things. Then you add cost, onboarding, agent. Each piece is optional and replaceable.

2

📁 Folder structure: the backbone

The dashboard can only show what’s organized. That’s why the folder structure comes before everything else: a root folder with subfolders for projects, skills, agents, knowledge, the dashboard, and—the key piece—a folder dados/ with simple files that the dashboard and Claude can read.

What it is:

A root folder (e.g., meu-os/) with subfolders by category and a dados/ for the JSON files.

Why learn:

The structure is what makes everything else possible and automatable. Without it, there is nothing for the dashboard to read.

Key concepts:

Root folder as an index · one subfolder per category · data in a simple format (JSON/markdown) that the dashboard and Claude can read.

Suggested root folder structure

meu-os/
├── CLAUDE.md            ← o "quadro de avisos" (mestre)
├── projetos/            ← um diretório por projeto seu
├── skills/              ← suas skills
├── agentes/             ← seus subagentes
├── conhecimento/        ← memória longa (notas, referências)
├── dados/               ← o painel LÊ daqui
│   ├── projetos.json
│   ├── skills.json
│   ├── agentes.json
│   └── custo.json
└── painel/
    └── index.html       ← a "vitrine" clicável
1

Create the root folder

Something like meu-os/. It's the index of everything.

2

Create one subfolder per category

projetos/, skills/, agentes/, conhecimento/, painel/, dados/.

3

Set aside dados/ for the dashboard

It’s where projetos.json, custo.json and the like.

3

📋 The master CLAUDE.md: who's in charge of the whole thing

O CLAUDE.md at the root of the meu-os/ é o system's brain: describes where everything goes, the general rules, and how Claude should update the data. When you ask "update my dashboard" in any chat, Claude reads this file and knows exactly what to do.

What it is:

A short file in the root that describes the entire system: folder map, rules, and maintenance instructions.

Why learn:

It’s the source of truth that makes the system follow natural language commands in any new chat.

Key concepts:

Folder map · global rules · maintenance instructions ("when adding a skill, record it in dados/skills.json") · stays short and stable (~250 words).

Skeleton of the meu-os/CLAUDE.md (~250 words)

# Meu OS pessoal — Claude Code

## Mapa de pastas
- projetos/      → um diretório por projeto
- skills/        → minhas skills
- agentes/       → meus subagentes
- conhecimento/  → memória longa
- dados/         → JSON que o painel lê
- painel/        → index.html (a vitrine)

## Arquivos de dados
- dados/projetos.json  → nome, status, objetivo
- dados/skills.json    → nome, descrição, modelo
- dados/custo.json     → serviço, gasto, % de uso

## Regras de manutenção
- Ao adicionar projeto/skill/custo, edite SÓ o JSON
  correto em dados/.
- Nunca invente preços ou valores — pergunte se faltar.
- Mantenha este arquivo curto; detalhes vão nos JSON.
Going deeper (optional): why ~250 words?

One CLAUDE.md bloated gets read in full in every chat—it uses up context and becomes outdated quickly. Keep only what’s stable (map + rules). Everything that changes constantly (the project list, expenses) lives in the JSON files for dados/ and in conhecimento/, which Claude reads only when needed.

4

🖥️ The HTML dashboard that reads JSON: the clickable showcase

The dashboard is a single page index.html that reads the files from dados/ and displays project cards, a list of skills/agents, and a cost summary. No build, no backend, no framework — opens directly in the browser (file://) and turns raw data into the “car dashboard.”

What it is:

A page that loads local JSON via fetch and renders visual blocks; Claude generates and updates the HTML for you.

Why learn:

It’s what lets you glance over and understand your usage instead of opening five files.

Key concepts:

A page · no build/backend · reads JSON via fetch · start with three blocks: Projects, Skills, Monthly cost.

Example dashboard — the heart of painel/index.html

<div id="projetos"></div>
<div id="custo"></div>

<script>
async function carregar() {
  // lê os JSON de dados/ (caminho relativo ao index.html)
  const proj  = await fetch('../dados/projetos.json').then(r => r.json());
  const custo = await fetch('../dados/custo.json').then(r => r.json());

  // cards de projetos
  document.getElementById('projetos').innerHTML =
    proj.map(p => `<article><b>${p.nome}</b> — ${p.status}</article>`).join('');

  // soma de custo + alerta de subuso
  const total = custo.reduce((s, c) => s + c.gasto, 0);
  const subuso = custo.filter(c => c.uso < 40);
  document.getElementById('custo').innerHTML =
    `Total do mês: R$ ${total.toFixed(2)}` +
    (subuso.length ? ` · ⚠️ subutilizado: ${subuso.map(c => c.servico).join(', ')}` : '');
}
carregar();
</script>

Illustrative mockup—Claude builds the complete HTML/style for you; what matters is the pattern: read JSON → render → add up/alert.

💡 Practical tip

Some browsers block fetch of local files for security. If the dashboard opens empty in file://, ask Claude to spin up a simple local server (one line) or embed the data directly in the HTML while you test.

5

💸 Track costs and usage across models

O dados/custo.json é o fuel gauge: you log spending and usage by model/subscription, and the dashboard adds it up and highlights underuse. This is where the system "pays for itself" — spotting an underused subscription could lead you to switch plans and save money.

What it is:

A file with one entry per service (model, cost, % used) that the dashboard totals and analyzes.

Why learn:

It’s the system’s most concrete return: clarity about where your AI money is going (and where it’s sitting idle).

Key concepts:

Manual or semi-automated tracking · one item per service · spending and usage fields · prices come from the official page — never guess values.

Example of dados/custo.json

[
  { "servico": "Claude (assinatura)", "gasto": 100.00, "uso": 78 },
  { "servico": "API Claude (avulso)", "gasto":  35.00, "uso": 55 },
  { "servico": "Editor IA",            "gasto":  50.00, "uso": 20 }
]

Values are examples. Use your own; for the API, see the official prices. The service with uso low (here, 20%) is what the dashboard flags for you to reassess.

1

List one item per service

Model/subscription, monthly spending, and usage percentage.

2

Ask Claude to add up and mark sub-usage

Monthly total + alert for low-usage services.

3

Show the total and alerts on the dashboard

At a glance, you decide whether to keep, downgrade, or cancel a plan.

6

🚀 Skills/Agents Onboarding and Catalog

Two pieces complete the system. The onboarding has Claude scan your machine (read-only), discover the tools you use, and fill in the initial data. The catalog keeps a record of every skill and agent—with the right model for each task—so you never reinvent the wheel.

What it is:

Onboarding = detecting tools in PATH with confirmation before saving. Catalog = skills.json e agentes.json with a name, description, and recommended model.

Why learn:

Onboarding gets the system “ready to run” on your machine without manual typing; the catalog helps you remember what you already have.

Key concepts:

Safe, read-only commands · confirmation before writing · a strong model for deep reasoning, a lightweight model for repetitive tasks · nothing is fixed; everything is editable.

✓ Onboarding best practices

  • ✓Detect via binaries in PATH and known configs — read-only.
  • ✓Show the list and ask for confirmation before writing.
  • ✓Save in dados/ferramentas.json; you can add anything missing later.

✗ What to avoid

  • ✗Let Claude write without having you review the list.
  • ✗Catalog without the recommended model field.
  • ✗Treating what wasn’t detected as “impossible”—you just need to add it.

Example of dados/skills.json (catalog)

[
  { "nome": "revisar-texto", "faz": "revisa ortografia e clareza",
    "modelo": "leve (tarefa repetitiva)" },
  { "nome": "arquiteto", "faz": "planeja arquitetura de projeto",
    "modelo": "forte (raciocínio profundo)" }
]
Going deeper (optional): goals and an open-source agent

To make the system more dynamic, record medium-term goals in a dados/metas.json that the dashboard displays as progress, and turn on conhecimento/ as long-term memory. If you want to talk about your goals, you can plug in an agent open-source and free — for example, the Hermes Agent, completely optional and with no hidden costs. None of this is required: the dashboard works very well on its own.

Self-check (optional): what enables the HTML dashboard to stay up to date through natural language commands?

🧪 Guided Hands-On Example

Build a minimum viable version of your personal OS, from scratch to a dashboard open in your browser.

1. Create the structure

In the terminal or by asking Claude, build meu-os/ with the subfolders and empty JSON files (use the tree from topic 2).

2. Open meu-os/ in Claude Code

Point Claude to the root folder.

3. Write the CLAUDE.md master

Use Prompt 1. Include the folder map and maintenance rules.

4. Enter the information

2–3 real projects in projetos.json; your subscriptions in custo.json; 3 skills in skills.json.

5. Generate the dashboard

Ask painel/index.html reading the three JSON files: project cards, skills list, and total cost with an underuse alert.

6. Open in the browser

Two clicks on painel/index.html. You should see your data.

7. Test maintenance

In one new chat, ask: "Add project X and update the dashboard." If Claude edits the right JSON by reading only the CLAUDE.md, the system is working.

✏️ Exercises

1. Build the backbone (easy)

Create the root folder with all subfolders and empty files. Criterion: the folder tree exists and matches the example.

2. Write the CLAUDE.md master (medium)

Maximum ~250 words, with a folder map and maintenance rules. Criterion: in a new chat, Claude describes the system just by reading this file.

3. Generate the Minimum Dashboard (medium)

Do the index.html show projects, skills, and cost from JSON files. Criterion: opens in the browser and displays your real data.

4. Track actual costs (medium)

Fill in custo.json with your subscriptions and mark the one you use least. Criterion: the dashboard highlights the underused service.

5. Maintenance command (difficult)

In a new chat, ask Claude to add a new skill. Criterion: skills.json is updated, and the skill appears in the panel without you editing it by hand.

⌨️ Ready-to-use prompts

Paste these into Claude Code pointed at the folder meu-os/. They assemble each part of the system. The complete database is in the Library → Prompts.

1. Create the CLAUDE.md master

Esta pasta é o meu "sistema operacional pessoal" para o Claude Code.
Crie um CLAUDE.md mestre, curto (~250 palavras), com:
- mapa de pastas (projetos, skills, agentes, conhecimento, dados, painel);
- o que cada arquivo em dados/ contém (projetos.json, skills.json, custo.json);
- regras de manutenção: ao eu pedir para adicionar projeto/skill/custo,
  atualize o JSON correto em dados/ e nunca invente valores.
Não escreva HTML aqui, só o CLAUDE.md.

2. Generate the simple HTML dashboard

Crie painel/index.html: uma única página, sem framework e sem backend,
que carrega via fetch os arquivos dados/projetos.json, dados/skills.json
e dados/custo.json e mostra três blocos: cards de Projetos, lista de Skills
e resumo de Custo do mês. Deve abrir direto no navegador (file://).
Visual limpo e escuro. Comente o código.

3. Detect Installed Tools (Onboarding)

Vasculhe minha máquina e detecte quais ferramentas de IA e dev eu uso
(CLIs, editores, terminais, agentes). Use comandos seguros, só de leitura.
Me mostre a lista para eu confirmar antes de salvar.
Depois grave o resultado em dados/ferramentas.json.
O que não achar, eu adiciono depois.

4. System maintenance command

Vou pedir mudanças no meu OS pessoal (adicionar projeto, skill, custo ou meta).
Sempre leia o CLAUDE.md mestre primeiro, edite só o JSON correto em dados/
e me diga o que mudou. Se algo não existir, me pergunte antes de criar.

⚠️ Common errors

  • ✗Wanting everything on day 1. Try to reproduce a dashboard packed with features all at once. Fix: start with a root folder + CLAUDE.md + three blocks in the panel; grow as needed.
  • ✗Scattered, unformatted data. Saving information in random places that the dashboard doesn’t read. Fix: centralize in dados/ with simple, consistent JSON.
  • ✗Guess prices and expenses. Make up values in the cost tracking. Fix: use only what you provide or the official prices.
  • ✗CLAUDE.md bloated master. Fill it with details that keep changing. Fix: keep it to ~250 words; details go in the JSON files and conhecimento/.
  • ✗Treat the system as closed. Thinking it’s “all or nothing” and getting stuck when something isn’t detected. Fix: everything is editable; add anything missing by asking Claude.

✅ Module summary

✓
The personal OS — a layer you put together (not buy): root folder + CLAUDE.md master + dashboard.
✓
Structure and data — one subfolder per category and simple JSON in dados/ that the dashboard reads.
✓
The dashboard — a page that reads JSON and displays projects, skills, and costs at a glance.
✓
Cost, onboarding, and catalog — the system pays for itself, installs itself, and never lets you reinvent the wheel.

Completion checklist

  • ☐ I created the root folder meu-os/ with all the subfolders.
  • ☐ I wrote a CLAUDE.md master (~250 words) with a folder map and maintenance rules.
  • ☐ I filled in projetos.json, skills.json e custo.json with real data.
  • ☐ I generated painel/index.html and it opens in the browser showing my data.
  • ☐ The cost tracker adds up expenses and highlights an underused service.
  • ☐ I tested a maintenance command in a new chat, and the correct JSON was updated.
  • ☐ (Optional) I recorded a goal and/or explored an open-source agent.

You've reached the end of the learning journey:

This is the last module of the course. The next step is Library — your collection of prompts, skills, and agents, ready to consult whenever you need them.