AGENT SKILL

second-brain

暂无简介

License 许可
MIT
最近更新
2026-07-12
Stars
★ 0
Forks
0

02 资源文件 1

03 SKILL.md 正文

# second-brain Development Patterns

> Auto-generated skill from repository analysis

## Overview
This skill teaches the core development patterns and conventions used in the `second-brain` Python repository. You'll learn how to structure files, write code, follow commit conventions, and organize tests as practiced in this codebase. The repository uses Python without a specific framework, and emphasizes clarity, modularity, and maintainability.

## Coding Conventions

### File Naming
- Use **camelCase** for file names.
  - Example: `noteManager.py`, `dataLoader.py`

### Import Style
- Use **relative imports** for modules within the project.
  - Example:
    ```python
    from .utils import parseData
    ```

### Export Style
- Use **named exports** (i.e., explicitly define what is exported from a module).
  - Example:
    ```python
    def processNote(note):
        # logic here
        return processed

    __all__ = ['processNote']
    ```

### Commit Messages
- Follow the **Conventional Commits** style.
- Use the `feat` prefix for new features.
- Keep commit messages concise (average ~76 characters).
  - Example:
    ```
    feat: add support for tagging notes with multiple labels
    ```

## Workflows

### Feature Development
**Trigger:** When adding a new feature or module  
**Command:** `/feature-development`

1. Create a new file using camelCase naming.
2. Implement the feature using relative imports for dependencies.
3. Export functions or classes using named exports.
4. Write or update corresponding test files (`*.test.*`).
5. Commit changes using the `feat:` prefix and a concise message.

### Testing
**Trigger:** When writing or running tests  
**Command:** `/run-tests`

1. Create test files following the `*.test.*` pattern (e.g., `noteManager.test.py`).
2. Write test cases for each exported function or class.
3. Run tests using the project's preferred test runner (framework not specified; use `pytest` or `unittest` as appropriate).

## Testing Patterns

- Test files are named with the `*.test.*` pattern.
  - Example: `noteManager.test.py`
- Each test file should target a specific module or feature.
- The testing framework is not specified; use standard Python testing practices.
- Example test structure:
  ```python
  import unittest
  from .noteManager import processNote

  class TestProcessNote(unittest.TestCase):
      def test_basic(self):
          note = "Sample note"
          result = processNote(note)
          self.assertIsNotNone(result)

  if __name__ == '__main__':
      unittest.main()

Commands

Command Purpose
/feature-development Start a new feature/module workflow
/run-tests Run all tests in the repository

04 同仓库更多 Skills

macrosoft3
macrosoft3/second-brain_

obsidian-markdown

Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.

★ 0
macrosoft3
macrosoft3/second-brain_

obsidian-cli

Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.

★ 0
macrosoft3
macrosoft3/second-brain_

obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

★ 0
macrosoft3
macrosoft3/second-brain_

json-canvas

Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.

★ 0
macrosoft3
macrosoft3/second-brain_

init

暂无简介

★ 0
macrosoft3
macrosoft3/second-brain_

hello

Greet the user with a personalized message

★ 0