Skip to content

eriknyquist/diligence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

diligence

Make Claude do a better job of providing verifiably correct technical information by default

Stars Last Commit License

ActivationWhat It DoesExampleInstallation


A skill for Claude.ai and Claude Code that enforces two behaviours for the entire session once activated:

  1. Source verification — every verifiable technical claim is checked via web search and cited with a URL and navigation path before being stated.
  2. Pedantic clarification — ambiguous questions are never answered by guessing. Claude asks first.

Activation

Type /diligence in any conversation. The skill stays active for the rest of the session.

What it does

Attempts to mitigate the following two problems that often occur when debugging a problem with Claude:

  • Claude gives incorrect information - User asks for source of information - Claude actually looks up the source and realizes it was wrong, corrects original information. Why can't Claude just do this the first time?

  • User ask ambiguous question, and instead of trying to clarify intent, Claude gives long response attempting to cover all bases. Waste of time.

Source verification

Every technical claim — API signatures, hardware specs, datasheet values, library behaviour, protocol details, CLI flags — is verified against a primary public source (official docs, GitHub, datasheets, RFCs) before being stated. If verification fails after 3–5 searches, Claude still answers but flags the unverified claims with the sources that were checked.

Citations follow this format:

[Source: <name> — <URL> → <navigation path>]

Clarifying questions

Claude asks before answering whenever the question is ambiguous in any of three ways:

  • Missing technical details — platform, use case, environment, or constraints not specified
  • Ambiguous phrasing — the question has multiple valid interpretations (e.g. "what makes FreeRTOS tick?" could mean the tick mechanism or general gotchas)
  • Referentially ambiguous follow-ups — bare replies like "why", "how", or "elaborate" with no clear antecedent after a multi-point response

Claude errs heavily toward asking rather than guessing.

Caveman compatibility

If caveman mode is also active, all prose is compressed through caveman rules after generation. Citations are exempt and always output in full.

Example

The same question, with and without diligence mode active.


User: how do I read a register over I2C on STM32?


😢Without /diligence

You can use HAL_I2C_Mem_Read() to read a register over I2C. Here's an example:

uint8_t value;
HAL_I2C_Mem_Read(&hi2c1, 0x68 << 1, 0x00, I2C_MEMADD_SIZE_8BIT, &value, 1, HAL_MAX_DELAY);

The second argument is the device address (left-shifted by 1 for STM32 HAL), the third is the register address, and the fourth specifies whether the register address is 8 or 16 bits wide.

🔎With /diligence

Claude: A few questions before I answer:

  • Which STM32 series? (F4, H7, other — HAL behaviour can differ)
  • Blocking (polling) or non-blocking (interrupt/DMA)?
  • Is the register address 8-bit or 16-bit?

User: STM32F4, blocking, 8-bit register address

Claude: Use HAL_I2C_Mem_Read() for blocking register reads. It handles the write-then-read sequence (sending the register address, then reading the data) in a single call.

uint8_t value;
HAL_StatusTypeDef status = HAL_I2C_Mem_Read(
    &hi2c1,               // I2C handle
    0x68 << 1,            // 7-bit device address, left-shifted by 1
    0x00,                 // register address
    I2C_MEMADD_SIZE_8BIT, // 8-bit register address width
    &value,               // rx buffer
    1,                    // number of bytes to read
    HAL_MAX_DELAY         // timeout
);

The device address must be left-shifted by 1 — STM32 HAL uses the 8-bit format (7-bit address + R/W bit) internally. [Source: ST UM1725 HAL driver manual — https://www.st.com/resource/en/user_manual/um1725-description-of-stm32f4-hal-and-lowlayer-drivers-stmicroelectronics.pdf → Section 33.2.4, HAL_I2C_Mem_Read]

Always check the return value: HAL_OK on success, HAL_TIMEOUT or HAL_ERROR on failure. [Source: STM32F4 HAL source — https://github.com/STMicroelectronics/stm32f4xx_hal_driver/blob/master/Src/stm32f4xx_hal_i2c.c → HAL_I2C_Mem_Read return values]

Installation

Claude.ai

  1. Download diligence.skill from the Releases page
  2. In Claude.ai, go to Settings → Skills and upload the .skill file
  3. Type /diligence in any conversation to activate

Claude Code

Add this repo as a marketplace, then install the plugin:

claude plugin marketplace add eriknyquist/diligence
claude plugin install diligence@diligence

Then type /diligence in any Claude Code session to activate.

For local testing without installing from GitHub:

claude --plugin-dir ./path/to/diligence

Contributing

See CONTRIBUTING.md.

Code of Conduct

See CODE_OF_CONDUCT.md.

License

MIT — see LICENSE.