From 27519fca29965c98ff2c3170dfcb6c7e9ab1f207 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sun, 8 Mar 2026 19:47:43 +0000 Subject: [PATCH] Fix CSP for images from brave --- lib/music_library_web/router.ex | 4 ++-- on-claude.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 on-claude.md diff --git a/lib/music_library_web/router.ex b/lib/music_library_web/router.ex index 00cd1b58..7004110a 100644 --- a/lib/music_library_web/router.ex +++ b/lib/music_library_web/router.ex @@ -15,7 +15,7 @@ defmodule MusicLibraryWeb.Router do "; script-src 'self'#{@dev_origins}" <> "; style-src 'self' 'unsafe-inline' https://rsms.me#{@dev_origins}" <> "; font-src 'self' https://rsms.me" <> - "; img-src 'self' data: https://lastfm.freetls.fastly.net" <> + "; img-src 'self' data: https://lastfm.freetls.fastly.net https://imgs.search.brave.com" <> "; connect-src 'self'#{@dev_origins}" <> "; frame-ancestors 'self'" <> "; base-uri 'self'" @@ -183,7 +183,7 @@ defmodule MusicLibraryWeb.Router do "; script-src 'self' 'nonce-#{nonce}'" <> "; style-src 'self' 'unsafe-inline' 'nonce-#{nonce}' https://rsms.me" <> "; font-src 'self' data: https://rsms.me" <> - "; img-src 'self' data: 'nonce-#{nonce}' https://lastfm.freetls.fastly.net" <> + "; img-src 'self' data: 'nonce-#{nonce}' https://lastfm.freetls.fastly.net https://imgs.search.brave.com" <> "; connect-src 'self'" <> "; frame-ancestors 'self'" <> "; base-uri 'self'" diff --git a/on-claude.md b/on-claude.md new file mode 100644 index 00000000..04609484 --- /dev/null +++ b/on-claude.md @@ -0,0 +1,28 @@ +After a few weeks of daily use I feel like I'm getting consistently good results with Claude. + +I jump between two applications (always Elixir): + +- the work one is very large, around 3500 files, and has a VERY structured set of skills, scripts, and generally speaking tooling to work with agents. +- my own application to manage music records which is around 200 files, which has a much smaller setup + +In my application, Opus 4.6 is excellent: most of the times it just one-shots the needed change. I believe it's because: + +1. The AGENTS.md file is predominantly generated by https://hexdocs.pm/usage_rules/readme.html, which pulls directives from dependencies. +2. I only have two additional docs referenced in AGENTS.md: + +- 1 for architecture, which describes at a high level the application + structure, who does what, how it's stored, etc. I created that by asking + Opus to describe the architecture of th application in a way that would + help it to maintain it and extend it. I reviewed it manually and tweaked it + afterwards. It's updated automatically by Claude when it makes changes to + the codebase. +- 1 for project conventions, again generated by asking Claude to extract + project conventions by analyzing the last 500 commits. Every once in a while, + I ask Claude to check it and update it. + +3. The test suite is extensive, more than I would "naturally" do. This makes it + that there usually is a very easy correspondence between files that get + changed and tests to run or edit, and Claude leverages this consistently. + This also means that some tests are maybe redundant. +4. Only one skill, ui-development, which contains the auto-generated + documentation from a UI toolkit I'm using.