Skip to content

[camera_andriod_camerax] Add gspencergoog/write-prose skill - #12309

Open
camsim99 wants to merge 3 commits into
flutter:mainfrom
camsim99:add_write-pose
Open

[camera_andriod_camerax] Add gspencergoog/write-prose skill#12309
camsim99 wants to merge 3 commits into
flutter:mainfrom
camsim99:add_write-pose

Conversation

@camsim99

@camsim99 camsim99 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Installs https://github.com/gspencergoog/skills/tree/main/skills/write-prose to the third_party directory and symlinks it to the camera_android_camerax plugin.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 29, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the write-prose skill, which includes guidelines, standards, and a Python script (analyze_prose.py) to analyze text statistics and scan for banned AI-isms. Feedback on the changes highlights several issues: hardcoded absolute paths in SKILL.md and standards.md, markdown links wrapped in backticks in SKILL.md violating the defined standards, a bug in analyze_prose.py where the banned word scanner fails to track code blocks, and an issue where sentence splitting is performed on raw text instead of filtered paragraphs, skewing statistics.

1. **Run the Statistical Analyzer**:
Execute the analyzer script on the target file:
```bash
python3 /usr/local/google/home/gspencer/.gemini/config/skills/write-prose/scripts/analyze_prose.py <path-to-file>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This command uses a hardcoded absolute path pointing to a specific user's home directory (/usr/local/google/home/gspencer/...). This will fail for other developers and CI environments. Please use a repository-relative path instead.

Suggested change
python3 /usr/local/google/home/gspencer/.gemini/config/skills/write-prose/scripts/analyze_prose.py <path-to-file>
python3 third_party/skill-repos/gspencergoog/.agents/skills/write-prose/scripts/analyze_prose.py <path-to-file>

| **Word Length** | $\le \mathbf{5\text{ characters}}$ median | Prefer simple words (*use* vs *utilize*, *check* vs *investigate*). |
| **Noun Clusters** | $\le \mathbf{3\text{ consecutive nouns}}$ | Avoid heavy noun stacks (e.g., write *"system for monitoring engine temperature"*, not *"engine temperature monitoring system"*). |

Run `python3 /usr/local/google/home/gspencer/.gemini/config/skills/write-prose/scripts/analyze_prose.py <path-to-file>` to measure these stats automatically.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This command uses a hardcoded absolute path pointing to a specific user's home directory. Please use a repository-relative path instead to ensure it works for all contributors.

Comment on lines +41 to +44
- **Pull Request Descriptions**: Refer to [`write-pr-description`](../write-pr-description/SKILL.md) for diff structure and testing steps.
- **Commit Messages**: Refer to [`commit-changes`](../commit-changes/SKILL.md) for conventional commit formatting.
- **Code & API Documentation**: Refer to [`code-documentation`](../code-documentation/SKILL.md) for docstring and tag conventions.
- **AI Prompts & Skill Instructions**: Refer to Section 7 in [`references/standards.md`](references/standards.md#7-prompt-design-standards-for-llm-audiences) for XML tagging, primacy placement, and token conservation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These links violate the critical rule defined in standards.md (Section 2), which states that markdown link text should never be wrapped in backticks because it breaks clickable formatting in IDEs and web views.

Suggested change
- **Pull Request Descriptions**: Refer to [`write-pr-description`](../write-pr-description/SKILL.md) for diff structure and testing steps.
- **Commit Messages**: Refer to [`commit-changes`](../commit-changes/SKILL.md) for conventional commit formatting.
- **Code & API Documentation**: Refer to [`code-documentation`](../code-documentation/SKILL.md) for docstring and tag conventions.
- **AI Prompts & Skill Instructions**: Refer to Section 7 in [`references/standards.md`](references/standards.md#7-prompt-design-standards-for-llm-audiences) for XML tagging, primacy placement, and token conservation.
- **Pull Request Descriptions**: Refer to [write-pr-description](../write-pr-description/SKILL.md) for diff structure and testing steps.
- **Commit Messages**: Refer to [commit-changes](../commit-changes/SKILL.md) for conventional commit formatting.
- **Code & API Documentation**: Refer to [code-documentation](../code-documentation/SKILL.md) for docstring and tag conventions.
- **AI Prompts & Skill Instructions**: Refer to Section 7 in [references/standards.md](references/standards.md#7-prompt-design-standards-for-llm-audiences) for XML tagging, primacy placement, and token conservation.

Comment on lines +119 to +122
for line_idx, line in enumerate(lines, 1):
# Skip code blocks
if line.strip().startswith('```') or line.strip().startswith('|'):
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation only skips the lines that start with ``` or |, but it does not track whether the scanner is currently inside a code block. This will cause false positives for any banned words that appear inside code blocks. We should track in_code_block to correctly skip all code block contents.

    in_code_block = False
    for line_idx, line in enumerate(lines, 1):
        line_str = line.strip()
        if line_str.startswith('```'):
            in_code_block = not in_code_block
            continue
        if in_code_block or line_str.startswith('|'):
            continue

median_word_length = statistics.median(word_lengths) if word_lengths else 0

# Sentences analysis
sentences = split_into_sentences(full_text)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Splitting sentences directly from full_text includes code blocks, tables, and headers, which will highly skew the sentence count and length statistics. Since paragraphs already filters out these non-prose elements, we should split sentences from the extracted paragraphs instead.

Suggested change
sentences = split_into_sentences(full_text)
sentences = []
for para in paragraphs:
sentences.extend(split_into_sentences(para))

@camsim99 camsim99 added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Jul 29, 2026
@camsim99
camsim99 requested a review from reidbaker July 29, 2026 16:52

@reidbaker reidbaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we would add evidence of this skill running and providing value before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: camera

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants