Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mých 10 tipů pro Claude Code (a vývoj s AI)

Avatar for Jan Smitka Jan Smitka
September 15, 2026

Mých 10 tipů pro Claude Code (a vývoj s AI)

Na minulých setkáních se objevovaly různé tipy a střípky týkající se vývoje s AI, ať už ve formě lightning talků či příspěvků v diskuzích. Inspirovalo mě to ke shrnutí poznatků a tipů, které se mi v praxi osvědčily.

Tipy se budou týkat různých oblastí: zlepšení bezpečnosti, rozhraní pro práci s více paralelními agenty, prompting, pomocné skilly, pracovní postupy a další. Naprostou většinu využijete i s jinými modely a nástroji!

Avatar for Jan Smitka

Jan Smitka

September 15, 2026

More Decks by Jan Smitka

Other Decks in Programming

Transcript

  1. Pyvo #52 Mých 15* tipů pro Claude Code ft Jan

    Smitka Tech Lead & So ware Engineer
  2. • Zápis pouze do složky projektu, vše ostatní pouze pro

    čtení. • Zakázán přístup do internetu - localhost a interní IP adresy povoleny. Whitelist domén pomocí proxy. • Zakázán přístup k UNIX socketům. • Platí i pro příkazy, které agent spouští.
  3. ~/.claude/settings.json { "sandbox": { "enabled": true, "network": { "allowedDomains": ["github.com",

    "api.github.com", "*.npmjs.org"], "allowUnixSockets": ["/tmp/.s.PGSQL.5432"], "allowLocalBinding": true }, "f lesystem": { "allowWrite": ["~/.cache", "~/.npm", "~/.pip", " tmp"], "denyRead": ["~/.ssh", "~/.kube", "~/.conf g/gcloud"] }, "excludedCommands": ["docker *"] } / / i i }
  4. Subagenti • Izolovaný kontext - "nezanáší" hlavní vlákno. • Agenti

    mohou běžet paralelně. • Claude rád spouští agenty na exploraci. • Mohou být různých typů - různé globální instrukce.
  5. Use a subagent to implement the score column - use

    the same backing data as seen on the project report view. Add the logic, data to API, and update the frontend.
  6. For all coding tasks use your judgement to decide an

    appropriate lower power model and run that in a subagent Simon Willison - Fable's judgment simonwillison.net/2026/jul/3/judgement/
  7. Workflow • JavaScript řídí spouštění subagentů a předávání výstupů mezi

    nimi. • Skript je deterministický, běh agentů lze pozastavit a pak zase spustit.
  8. Validate and resolve pending review comments on the current PR

    from CodeRabbit. Read the comments and group same issues on di erent files together. Then use workflow to resolve each issue group sequentially, so the subagents never interfere with each other. Use "Prompt for AI Agents" from each comment as instructions for each subagent. Changes made by each subagent will be commited as a single commit. If a review comment is invalid or rejected, prepare a reply to the corresponding comment on GitHub, but do not post it yet. ff ft A er all fixes are in, push the changes and post ALL comment replies at once. Don't mark any comments resolved - it is expected that CodeRabbit will check the comments and resolve the comments.
  9. I need to find user-facing strings in the project that

    are currently not marked as translatable. These can appear: •… Explore the folder structure, divide it to clusters containing related files, and then use a workflow with Sonnet 5 agents on high reasoning to find untranslated strings in parallel. Make user-facing strings translatable; report other strings that are passed to templates for manual review. Ignore dynamic strings, such as model fields etc.
  10. /config > Output Style Concise: Claude leads with the result,

    skips preamble and narration, and keeps responses short by default, while doing the engineering work as thoroughly as in the Default style.
  11. ~/.claude/output styles/<name>.md --name: My style description: My custom style keep

    coding instructions: true --- . . - . - - - Lorem ipsum
  12. Prompting Claude Fable 5.1 - Writing Density https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/ prompting-claude-fable-5-1#writing-density Mannered

    prose substitutes metaphor and flourish for direct statement. Instead of "a parameter worth varying," the mannered writer produces "a dial worth turning." Instead of "this point still matters," they write "this point earns its keep." The phrases exist to display the writer, not to convey the idea, and readers can tell. That is why mannered prose irritates: it makes the reader work harder so the writer can perform. It is also imprecise. Metaphors drag in connotations the writer did not choose and cannot control. The fix is to say what you mean. When a literal phrase is available, use it.
  13. For a new social app, start with PostgreSQL, and the

    bar for choosing MongoDB instead is high. Social apps are relationship-heavy by nature: users follow users, posts belong to users, comments belong to posts, likes connect users to posts. That's a web of connections, exactly what a relational database is built for. In MongoDB you either cram related data into one record and ght size limits, or split it out and end up stitching it back together in your app code anyway. The feed problem makes this worse: timelines, "posts from people you follow," and mutual-friend lookups all lean on the kind of cross-referencing Postgres does in a single query. You also get consistency for free, since follow counts and "did I already like this" checks want real transactions… [and it keeps going like this] → Use PostgreSQL. A social app is all relationships (friends, follows, likes), and Postgres handles those natively. Right for ~90% of new social apps. fl Attention-kind · 94 words fi fi fi Default · 430 words → You keep exibility. Its JSONB column stores schema-less data inside the same database, so you get MongoDB's looseness without leaving Postgres. → Pick MongoDB only if your data is selfcontained documents with no links, and you need massive write volume on day one. → The early trap with MongoDB: six months in, ve different shapes of "user" and no clean x. Postgres forces the structure. → Next: start on managed Postgres (Supabase, Neon, RDS).
  14. Round 1. These are the decisions that do not depend

    on each other. ❓ Q1 - Rendering stack: Rich Live cannot read keys, and phase 4 needs Enter. Options: (a) Rich Live(screen=True) plus a small raw-mode stdin reader using termios/select; (b) Textual app with a canvas widget; (c) … ➡ (a) Rich Live plus a raw-mode stdin reader, … ❓ Q2 - Target terminal: Which terminal emulator and roughly what size will run on the projector laptop? …
  15. Implement @spec.md . Use workflow to: 1. Plan the work.

    2. Run each task (or chunk of work) as a subagent. Commit as described in the plan. Prefer sequential workflow to avoid conflicts. 3. When done, run a step with /simplify on the entire branch, instruct it to create fixup commits so the final branch lands clean. 4. Autosquash the commits. 5. Run a step with /code-review --fix on the entire branch, instruct it to create fixup commits so the final branch lands clean. 6. Autosquash the commits.
  16. Každý den: • Vyber jeden úkol menšího rozsahu (PR na

    100 - 500 řádek). refactoring, doplnění testů, ošetření edge cases, … • Implementuj ho. • Vytvoř pull request.
  17. try: . . . . . . # except ValueError,

    TypeError: logger.exception(" ") app.send_to_flames()
  18. ### Python 3.14 syntax notes **Unparenthesized `except` with multiple exception

    types is valid** (PEP 758, Python 3.14+). `except ValueError, TypeError:` is equivalent to `except (ValueError, TypeError):` — it is **not** Python 2 syntax and will **not** raise a `SyntaxError`. Parentheses are still required when using `as` (e.g. `except (ValueError, TypeError) as e:`). Do not "fix" unparenthesized forms unless an `as` clause is being added.
  19. ### Comments and Docstrings Explain why the code is the

    way it is. Don't explain why you changed it. - **Why, not what.** A comment earns its place by naming a constraint the code can't show: why this order, why this cast, why not the obvious thing. Never paraphrase the next line. - **No history.** "used to", "previously", "legacy", "this replaces", "the old X" — write as if the current code is the only code that ever existed. Names included. - **Don't relitigate.** Justify the constraint you're living with, not the alternative you rejected. One sentence of "X would break Y" is a why; a paragraph is a commit message. - **Budget one or two sentences.** A multi-paragraph docstring on a helper is a smell.
  20. Insights Report • Shrnutí práce: na čem pracujete, jak CC

    používáte, co se daří, co se nedaří… • Co vyzkoušet: • • Co si přidat do CLAUDE.md • Nastavení hooks • Skilly Další možnosti automatizace úkolů i celých workflows