CrystalLens
CrystalLens is a social media screening and analysis platform that collects posts from multiple sources (via Apify scrapers) and applies local AI (Ollama) to generate character insights, behavioral patterns, and risk assessments for employees or candidates.
Install / Use
/learn @SecFathy/CrystalLensREADME
CrystalLens
Evidence‑driven social media analysis for sensitive roles — on‑prem with Ollama or fast in the cloud with Gemini.
</div>✨ Highlights
- Employee & Accounts: Manage employees and attach social accounts.
- Scraping: Start Twitter/Facebook scrapes via Apify with live job status.
- AI Analysis: Single‑request mode (fast) or staged evidence→assessment (robust).
- Specific Assessments: Political orientation, religious orientation, bias, personal issues, violence tendency, affiliation, suitability.
- Reports: Evidence‑backed narratives with citations, PDF export, CSV exports and dashboards.
- RBAC & Auditing: Roles for admin/manager/reviewer; audit log for sensitive actions.
🚀 Quickstart (Dev)
- Create a venv and install deps
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Configure
.env
cp .env.example .env
# APIFY_API_TOKEN=...
# OLLAMA_API_URL=http://localhost:11434
# OLLAMA_MODEL=llama3.1:8b (or qwen2.5:7b-instruct)
# GOOGLE_API_KEY=... (for Gemini)
# ANALYSIS_PROVIDER=ollama|gemini
- Seed an admin
python scripts/seed_admin.py
- Run
python run.py
# http://127.0.0.1:5000
⚙️ Configuration
DATABASE_URL: PostgreSQL in prod (SQLite for dev is fine)APIFY_API_TOKEN: required for scrapingOLLAMA_API_URL,OLLAMA_MODEL: for local LLMGOOGLE_API_KEY: for Gemini- Set your provider in Settings or via
ANALYSIS_PROVIDER
🤖 Providers
- Ollama (local): on‑prem, best when data must not leave your infra
ollama serve,ollama pull llama3.1:8b(orqwen2.5:7b-instruct)
- Gemini (cloud): fastest JSON formatting and latency
- Enter
GOOGLE_API_KEYin Settings; click “Test Gemini”
- Enter
🔒 Security
- API keys in
.env(not committed) - Sensitive endpoints protected via RBAC
- Audit logs for critical actions
🗺️ Roadmap
- Detail level presets (speed vs. depth)
- Chunk‑and‑synthesize long timelines
- More providers (OpenAI, Claude) via adapter
🤝 Contributing
PRs welcome. Please open issues first for major changes. Keep secrets out of commits.
⚠️ Disclaimer
This project is built for educational and research purposes only. It is not intended for real employee surveillance or unlawful use. Always comply with local laws, regulations, and platform Terms of Service.
📄 License
MIT — see LICENSE.
Related Skills
bluebubbles
344.1kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
bear-notes
344.1kCreate, search, and manage Bear notes via grizzly CLI.
claude-seo
3.7kUniversal SEO skill for Claude Code. 19 sub-skills, 12 subagents, 3 extensions (DataForSEO, Firecrawl, Banana). Technical SEO, E-E-A-T, schema, GEO/AEO, backlinks, local SEO, maps intelligence, Google APIs, and PDF/Excel reporting.
claude-ads
1.5kComprehensive paid advertising audit & optimization skill for Claude Code. 186 checks across Google, Meta, YouTube, LinkedIn, TikTok & Microsoft Ads with weighted scoring, parallel agents, and industry templates.
