Sonnet Political Bias Reader — Development skill for Claude Code
Uses Claude sonnet to read a csv file with political articles/studies and highlights their bias by level and explanation.
How to install Sonnet Political Bias Reader
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open RinDig/Sonnet-Political-Bias-Reader and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Sonnet Political Bias Reader does
Uses Claude sonnet to read a csv file with political articles/studies and highlights their bias by level and explanation.
Alternatives in Development
- Setup Mention Highlights — Setup Mention Highlighter Command 7.2k ★
- Explain Like Senior — Senior Developer Explanation 2.8k ★
- Portaljs Add Geo — Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a 2.3k ★
README
Political Text Bias Analyzer
This project contains a Python script that analyzes political texts for ideological bias using advanced prompt engineering and the Anthropic Claude 3.5 Sonnet API. The analysis is based on a custom prompt designed for political scientists, aiming to detect subtle and overt political leanings in textual content.
Project Overview
This script is part of my ongoing research projects in political science. It leverages custom prompt engineering to create a sophisticated system for political bias detection. The core of the analysis relies on a detailed prompt that instructs the AI to consider various aspects of political bias, including:
- Portrayal of ideological groups
- Claims about science or academia
- Research findings and worldviews
- Policy positions
- Language and framing
The AI provides a nuanced analysis, categorizing texts on a spectrum from "High Conservative" to "High Liberal," with "Neutral" options for balanced or apolitical content.
Features
- Loads data from CSV files
- Utilizes the Anthropic Claude 3.5 Sonnet API for text analysis
- Categorizes texts based on political bias
- Provides detailed explanations for each categorization
- Saves results to a new CSV file
How It Works
- The script loads article data from a CSV file.
- Each article is sent to the Anthropic API for analysis.
- The API returns a category/level of bias and a detailed explanation.
- Results are compiled into a new DataFrame and saved to a CSV file.
Usage
To use this script:
- Ensure you have the required libraries installed (pandas, anthropic).
- Replace the placeholder API key with your actual Anthropic API key.
- Prepare your input CSV file with a column containing the texts to analyze.
- Run the script, specifying your input file name and column name.
The script will process each text and save the results to a new CSV file named 'stuff_with_analysis.csv'.
Note
This project is for research purposes and demonst
Related Skills
Zh Article Analyzer Skill
Claude Code skill for deep linguistic analysis of Traditional Chinese articles—extract stylometrics, vocabular
Second Reader
Build a vault that can teach and advise you from your sources as if you'd carefully read and distilled them yo
Reader
Read the whole packet as the human who actually receives it
Foundry Capture Snipd
Capture Snipd podcast highlights from a designated Apple Notes folder into raw/clippings/ for /foundry-ingest
Chinesepua
A plugin that generates satirical explanation cards for Chinese phrases
Detail
Get the full technical explanation of the last answer, just this once
Related Agents
Kss Explorer
KSS explorer — sonnet, low effort, read-only. Answers one bounded question about the codebase with file:line e
Prose Clarity Reviewer
First-contact reader clarity reviewer for human-primary articles, essays, blog posts, and newsletters. Reads o
Eng Director
Personas are Opus-only. The Director of Engineering, Director of Engineering — the Staff Engineer-level rigor